From owner-svn-src-all@FreeBSD.ORG Mon Feb 4 17:29:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AAF17E30; Mon, 4 Feb 2013 17:29:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9973CD2E; Mon, 4 Feb 2013 17:29:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r14HTDjJ020954; Mon, 4 Feb 2013 17:29:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r14HTD0U020953; Mon, 4 Feb 2013 17:29:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201302041729.r14HTD0U020953@svn.freebsd.org> From: Andriy Gapon Date: Mon, 4 Feb 2013 17:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246324 - head/sys/netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2013 17:29:13 -0000 Author: avg Date: Mon Feb 4 17:29:13 2013 New Revision: 246324 URL: http://svnweb.freebsd.org/changeset/base/246324 Log: ng_ether_ifnet_arrival_event: check interface type before using IFP2NG The check is copied from vnet_ng_ether_init. Not sure if it covers all the types that we want to support with ng_ether. Reported by: markj Discussed with: zec MFC after: 10 days X-MFC with: r246245 Modified: head/sys/netgraph/ng_ether.c Modified: head/sys/netgraph/ng_ether.c ============================================================================== --- head/sys/netgraph/ng_ether.c Mon Feb 4 16:20:13 2013 (r246323) +++ head/sys/netgraph/ng_ether.c Mon Feb 4 17:29:13 2013 (r246324) @@ -410,11 +410,17 @@ static void ng_ether_ifnet_arrival_event(void *arg __unused, struct ifnet *ifp) { char name[IFNAMSIZ]; - node_p node = IFP2NG(ifp); + node_p node; + + /* Only ethernet interfaces are of interest. */ + if (ifp->if_type != IFT_ETHER + && ifp->if_type != IFT_L2VLAN) + return; /* * Just return if it's a new interface without an ng_ether companion. */ + node = IFP2NG(ifp); if (node == NULL) return;