Date: Sat, 25 Sep 2021 16:28:32 GMT From: Yoshihiro Takahashi <nyan@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: d653b188e89b - main - ng_ether: Create netgraph nodes for bridge interfaces. Message-ID: <202109251628.18PGSWTT032704@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=d653b188e89b5e44b2708342c7d3b789398f9cde commit d653b188e89b5e44b2708342c7d3b789398f9cde Author: Yoshihiro Takahashi <nyan@FreeBSD.org> AuthorDate: 2021-09-25 16:24:33 +0000 Commit: Yoshihiro Takahashi <nyan@FreeBSD.org> CommitDate: 2021-09-25 16:24:33 +0000 ng_ether: Create netgraph nodes for bridge interfaces. Create netgraph nodes for bridge interfaces when the ng_ether module is loaded. If a bridge interface is created after loading the ng_ether module, a netgraph node is created via ether_ifattach(). MFC after: 1 week --- sys/netgraph/ng_ether.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index 5718de235c4c..40e06604b8bb 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -414,7 +414,9 @@ ng_ether_ifnet_arrival_event(void *arg __unused, struct ifnet *ifp) node_p node; /* Only ethernet interfaces are of interest. */ - if (ifp->if_type != IFT_ETHER && ifp->if_type != IFT_L2VLAN) + if (ifp->if_type != IFT_ETHER && + ifp->if_type != IFT_L2VLAN && + ifp->if_type != IFT_BRIDGE) return; /* @@ -868,8 +870,9 @@ vnet_ng_ether_init(const void *unused) /* Create nodes for any already-existing Ethernet interfaces. */ IFNET_RLOCK(); CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if (ifp->if_type == IFT_ETHER - || ifp->if_type == IFT_L2VLAN) + if (ifp->if_type == IFT_ETHER || + ifp->if_type == IFT_L2VLAN || + ifp->if_type == IFT_BRIDGE) ng_ether_attach(ifp); } IFNET_RUNLOCK();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109251628.18PGSWTT032704>