-/* $OpenBSD: in.c,v 1.181 2023/04/18 22:20:16 kn Exp $ */
+/* $OpenBSD: in.c,v 1.182 2023/04/19 20:03:51 kn Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
#ifdef MROUTING
case SIOCGETVIFCNT:
case SIOCGETSGCNT:
- KERNEL_LOCK();
error = mrt_ioctl(so, cmd, data);
- KERNEL_UNLOCK();
break;
#endif /* MROUTING */
default:
-/* $OpenBSD: ip_mroute.c,v 1.137 2022/09/08 10:22:06 kn Exp $ */
+/* $OpenBSD: ip_mroute.c,v 1.138 2023/04/19 20:03:51 kn Exp $ */
/* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */
/*
if (inp == NULL)
return (ENOTCONN);
+ KERNEL_LOCK();
+
if (so != ip_mrouter[inp->inp_rtableid])
error = EINVAL;
else
break;
}
+ KERNEL_UNLOCK();
return (error);
}
-/* $OpenBSD: in6.c,v 1.259 2022/12/06 22:19:39 mvs Exp $ */
+/* $OpenBSD: in6.c,v 1.260 2023/04/19 20:03:52 kn Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
#ifdef MROUTING
case SIOCGETSGCNT_IN6:
case SIOCGETMIFCNT_IN6:
- KERNEL_LOCK();
error = mrt6_ioctl(so, cmd, data);
- KERNEL_UNLOCK();
break;
#endif /* MROUTING */
default:
-/* $OpenBSD: ip6_mroute.c,v 1.135 2022/09/08 10:22:07 kn Exp $ */
+/* $OpenBSD: ip6_mroute.c,v 1.136 2023/04/19 20:03:52 kn Exp $ */
/* $NetBSD: ip6_mroute.c,v 1.59 2003/12/10 09:28:38 itojun Exp $ */
/* $KAME: ip6_mroute.c,v 1.45 2001/03/25 08:38:51 itojun Exp $ */
if (inp == NULL)
return (ENOTCONN);
+ KERNEL_LOCK();
+
switch (cmd) {
case SIOCGETSGCNT_IN6:
NET_LOCK_SHARED();
error = ENOTTY;
break;
}
+
+ KERNEL_UNLOCK();
return error;
}