From owner-svn-src-head@freebsd.org Wed Aug 15 13:42:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D650F1085245; Wed, 15 Aug 2018 13:42:22 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CC518D672; Wed, 15 Aug 2018 13:42:22 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E2893057; Wed, 15 Aug 2018 13:42:22 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7FDgMSZ043379; Wed, 15 Aug 2018 13:42:22 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7FDgMTh043378; Wed, 15 Aug 2018 13:42:22 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201808151342.w7FDgMTh043378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 15 Aug 2018 13:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337844 - head/sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: loos X-SVN-Commit-Paths: head/sys/netgraph X-SVN-Commit-Revision: 337844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 13:42:23 -0000 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); }