vlan: Fix panic with lagg and vlan

vlan_lladdr_fn() is called from taskqueue, which means there's no vnet context
set. We can end up trying to send ARP messages (through the iflladdr_event
event), which requires a vnet context.

PR:		227654
MFC after:	3 days
This commit is contained in:
Kristof Provost 2018-10-21 16:51:35 +00:00
parent c4b23051af
commit 5191a3aea6

View File

@ -1302,8 +1302,13 @@ vlan_lladdr_fn(void *arg, int pending __unused)
ifv = (struct ifvlan *)arg;
ifp = ifv->ifv_ifp;
CURVNET_SET(ifp->if_vnet);
/* The ifv_ifp already has the lladdr copied in. */
if_setlladdr(ifp, IF_LLADDR(ifp), ifp->if_addrlen);
CURVNET_RESTORE();
}
static int