summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorzec <zec@FreeBSD.org>2012-03-04 11:11:03 +0000
committerzec <zec@FreeBSD.org>2012-03-04 11:11:03 +0000
commitd3c673348a51e3f37168fd1973291a6dd51b83dc (patch)
tree2dbb90d213ed807c18eec836a1171e73bc8e9d6d /sys/net
parent15e0aa0e65527afeabec9261a7d18cf472a1a3f5 (diff)
downloadFreeBSD-src-d3c673348a51e3f37168fd1973291a6dd51b83dc.zip
FreeBSD-src-d3c673348a51e3f37168fd1973291a6dd51b83dc.tar.gz
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
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 253371a..7c62e55 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -661,8 +661,10 @@ 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;
+ }
}
/*
@@ -681,6 +683,7 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m)
#endif
ifp->if_ierrors++;
m_freem(m);
+ CURVNET_RESTORE();
return;
}
OpenPOWER on IntegriCloud