We are going to unlock PF_ROUTE sockets. This means `if_rtrequest'
handler will be performed without kernel lock.
umb_rtrequest() calls umb_send_inet_proposal() which touches kernel lock
protected `ipv{4,6}dns' array. Also umb_rtrequest() is the only handler
which requires kernel lock to be held. So push the lock down to
umb_rtrequest() instead of grab it around `if_rtrequest' call.
This hunk was commited separately for decreases PF_ROUTE sockets
unlocking diff.
ok gerhard@ deraadt@
-/* $OpenBSD: if_umb.c,v 1.42 2021/03/30 20:58:19 sthen Exp $ */
+/* $OpenBSD: if_umb.c,v 1.43 2021/04/01 08:39:52 mvs Exp $ */
/*
* Copyright (c) 2016 genua mbH
struct umb_softc *sc = ifp->if_softc;
if (req == RTM_PROPOSAL) {
+ KERNEL_LOCK();
umb_send_inet_proposal(sc, AF_INET);
#ifdef INET6
umb_send_inet_proposal(sc, AF_INET6);
#endif
+ KERNEL_UNLOCK();
return;
}