When called with NULL options, ip_output() and ip6_output() are MP
safe. Convert exclusive to shared net lock in send dispatch.
OK mpi@
-/* $OpenBSD: ip_input.c,v 1.385 2023/05/18 09:59:43 mvs Exp $ */
+/* $OpenBSD: ip_input.c,v 1.386 2023/09/06 11:09:43 bluhm Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
if (ml_empty(&ml))
return;
- NET_LOCK();
+ NET_LOCK_SHARED();
while ((m = ml_dequeue(&ml)) != NULL) {
u_int32_t ipsecflowinfo = 0;
}
ip_output(m, NULL, NULL, flags, NULL, NULL, ipsecflowinfo);
}
- NET_UNLOCK();
+ NET_UNLOCK_SHARED();
}
void
-/* $OpenBSD: ip6_input.c,v 1.254 2022/08/21 14:15:55 bluhm Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.255 2023/09/06 11:09:43 bluhm Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
if (ml_empty(&ml))
return;
- NET_LOCK();
+ NET_LOCK_SHARED();
while ((m = ml_dequeue(&ml)) != NULL) {
ip6_output(m, NULL, NULL, 0, NULL, NULL);
}
- NET_UNLOCK();
+ NET_UNLOCK_SHARED();
}
void