From fdbf11746af89f8ba9e1ad3bf85e404b5bbcc2d7 Mon Sep 17 00:00:00 2001 From: Matt Joras Date: Wed, 13 Sep 2017 00:25:09 +0000 Subject: [PATCH] Allow vlan interfaces to rx through netmap(4). Normally after receiving a packet, a vlan(4) interface sends the packet back through its parent interface's rx routine so that it can be processed as an untagged frame. It does this by using the parent's ifp->if_input. This is incompatible with netmap(4), which replaces the vlan(4) interface's if_input with a netmap(4) hook. Fix this by using the vlan(4) interface's ifp instead of the parent's directly. Reported by: Harry Schmalzbauer Reviewed by: rstone Approved by: rstone (mentor) MFC after: 3 days Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12191 --- sys/net/if_vlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 1158c76d536f..43c44cade947 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1384,7 +1384,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) VLAN_RUNLOCK(); /* Pass it back through the parent's input routine. */ - (*ifp->if_input)(ifv->ifv_ifp, m); + (*ifv->ifv_ifp->if_input)(ifv->ifv_ifp, m); } static void