Properly restore curvnet context when returning early from

ether_input_internal().

This change only affects options VIMAGE kernel builds.

PR:		kern/165643
Submitted by:	Vijay Singh
MFC after:	3 days
This commit is contained in:
Marko Zec 2012-03-04 11:11:03 +00:00
parent c225ad032d
commit 2db13e7575

View File

@ -661,9 +661,11 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m)
m = (*lagg_input_p)(ifp, m);
if (m != NULL)
ifp = m->m_pkthdr.rcvif;
else
else {
CURVNET_RESTORE();
return;
}
}
/*
* If the hardware did not process an 802.1Q tag, do this now,
@ -681,6 +683,7 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m)
#endif
ifp->if_ierrors++;
m_freem(m);
CURVNET_RESTORE();
return;
}