-/* $OpenBSD: in.c,v 1.179 2022/12/06 22:19:39 mvs Exp $ */
+/* $OpenBSD: in.c,v 1.180 2023/04/15 13:24:47 kn Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
break;
#endif /* MROUTING */
default:
- KERNEL_LOCK();
error = in_ioctl(cmd, data, ifp, privileged);
- KERNEL_UNLOCK();
break;
}
return (error);
}
+ KERNEL_LOCK();
NET_LOCK();
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
}
err:
NET_UNLOCK();
+ KERNEL_UNLOCK();
return (error);
}
if (error)
return (error);
+ KERNEL_LOCK();
NET_LOCK();
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
if_addrhooks_run(ifp);
NET_UNLOCK();
+ KERNEL_UNLOCK();
return error;
}
return (error);
}
+ KERNEL_LOCK();
NET_LOCK();
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
}
NET_UNLOCK();
+ KERNEL_UNLOCK();
return (error);
}