Date: Wed, 15 Aug 2018 13:42:22 +0000 (UTC) From: Luiz Otavio O Souza <loos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337844 - head/sys/netgraph Message-ID: <201808151342.w7FDgMTh043378@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: loos Date: Wed Aug 15 13:42:22 2018 New Revision: 337844 URL: https://svnweb.freebsd.org/changeset/base/337844 Log: The interface name must be sanitized before the search to match the existing netgraph node. Fixes the search (and use) of VLANs with dot notation. Obtained from: pfSense Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/netgraph/ng_ether.c Modified: head/sys/netgraph/ng_ether.c ============================================================================== --- head/sys/netgraph/ng_ether.c Wed Aug 15 13:40:16 2018 (r337843) +++ head/sys/netgraph/ng_ether.c Wed Aug 15 13:42:22 2018 (r337844) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808151342.w7FDgMTh043378>