is not required. In packet processing path we have shared netlock held,
but we do read-only access on per session `flags' and `ifindex'. We always
modify them from ioctl(2) path with exclusive netlock held. The rest of
pipex(4) session is immutable or uses per-session locks.
ok bluhm@
-/* $OpenBSD: if_ethersubr.c,v 1.280 2022/06/26 15:50:21 mvs Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.281 2022/06/26 21:19:53 mvs Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
case ETHERTYPE_PPPOE:
if (m->m_flags & (M_MCAST | M_BCAST))
goto dropanyway;
- KERNEL_LOCK();
#ifdef PIPEX
if (pipex_enable) {
struct pipex_session *session;
if ((session = pipex_pppoe_lookup_session(m)) != NULL) {
pipex_pppoe_input(m, session);
pipex_rele_session(session);
- KERNEL_UNLOCK();
return;
}
pipex_rele_session(session);
}
#endif
+ KERNEL_LOCK();
if (etype == ETHERTYPE_PPPOEDISC)
pppoe_disc_input(m);
else