Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Dec 2025 16:57:30 +0000
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Seyed Pouria Mousavizadeh Tehrani <info@spmzt.net>
Subject:   git: ac6a7f621668 - main - if_clone: don't overwrite dump_nl of an attaching cloner with default
Message-ID:  <69403dfa.d7e0.19300d08@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=ac6a7f62166878038b9f8bd38a3fb1ff99ee8918

commit ac6a7f62166878038b9f8bd38a3fb1ff99ee8918
Author:     Seyed Pouria Mousavizadeh Tehrani <info@spmzt.net>
AuthorDate: 2025-12-15 16:53:47 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-12-15 16:53:47 +0000

    if_clone: don't overwrite dump_nl of an attaching cloner with default
    
    Reviewed by:            glebius
    Differential Revision:  https://reviews.freebsd.org/D54190
---
 sys/net/if_clone.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c
index 066547ceeeb3..4bc04130da1e 100644
--- a/sys/net/if_clone.c
+++ b/sys/net/if_clone.c
@@ -535,11 +535,12 @@ ifc_attach_cloner(const char *name, struct if_clone_addreq *req)
 
 		ifc->create_nl = req2->create_nl_f;
 		ifc->modify_nl = req2->modify_nl_f;
-		ifc->dump_nl = req2->dump_nl_f;
+		if (req2->dump_nl_f != NULL)
+			ifc->dump_nl = req2->dump_nl_f;
+		else
+			ifc->dump_nl = ifc_dump_ifp_nl_default;
 	}
 
-	ifc->dump_nl = ifc_dump_ifp_nl_default;
-
 	if (if_clone_attach(ifc) != 0)
 		return (NULL);
 


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69403dfa.d7e0.19300d08>