summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Souza <luiz@netgate.com>2017-10-24 10:43:56 -0500
committerLuiz Souza <luiz@netgate.com>2017-10-24 10:47:44 -0500
commite51d925dd69f387151e446dc9f335136d425f699 (patch)
tree03eb2142146809a86c9e298b8352c061b9f944bb
parent7eae9364d25765fe7150ddc72ae4302922d8209b (diff)
downloadFreeBSD-src-e51d925dd69f387151e446dc9f335136d425f699.zip
FreeBSD-src-e51d925dd69f387151e446dc9f335136d425f699.tar.gz
Look for the correct netgraph name when looking for VLANs in dot notation.
(cherry picked from commit b704d195464446419da88f4580ebaa5b2f8d7ac7)
-rw-r--r--sys/netgraph/ng_ether.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c
index 42c4f0e..6eed9ca 100644
--- a/sys/netgraph/ng_ether.c
+++ b/sys/netgraph/ng_ether.c
@@ -314,7 +314,8 @@ ng_ether_attach(struct ifnet *ifp)
* eiface nodes, which may be problematic due to naming
* clashes.
*/
- if ((node = ng_name2noderef(NULL, ifp->if_xname)) != NULL) {
+ ng_ether_sanitize_ifname(ifp->if_xname, name);
+ if ((node = ng_name2noderef(NULL, name)) != NULL) {
NG_NODE_UNREF(node);
return;
}
@@ -341,7 +342,6 @@ ng_ether_attach(struct ifnet *ifp)
priv->hwassist = ifp->if_hwassist;
/* Try to give the node the same name as the interface */
- ng_ether_sanitize_ifname(ifp->if_xname, name);
if (ng_name_node(node, name) != 0)
log(LOG_WARNING, "%s: can't name node %s\n", __func__, name);
}
OpenPOWER on IntegriCloud