diff options
author | 2017-08-11 21:24:19 +0000 | |
---|---|---|
committer | 2017-08-11 21:24:19 +0000 | |
commit | aa28b9a6d024fc39940a8bf6e59c28dbaafc6950 (patch) | |
tree | ad38cdfb637269384ad7ff4acea0c6e8e71932a7 /sys/netinet6 | |
parent | Be consistent with goto labels, failure flag and use of FAIL macro. (diff) | |
download | wireguard-openbsd-aa28b9a6d024fc39940a8bf6e59c28dbaafc6950.tar.xz wireguard-openbsd-aa28b9a6d024fc39940a8bf6e59c28dbaafc6950.zip |
Remove NET_LOCK()'s argument.
Tested by Hrvoje Popovski, ok bluhm@
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ip6_input.c | 7 | ||||
-rw-r--r-- | sys/netinet6/nd6.c | 19 | ||||
-rw-r--r-- | sys/netinet6/nd6_nbr.c | 7 |
3 files changed, 14 insertions, 19 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 63c7a635d10..db87b569dc0 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.200 2017/08/08 12:23:56 bluhm Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.201 2017/08/11 21:24:20 mpi Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -1442,7 +1442,6 @@ ip6_send_dispatch(void *xmq) struct mbuf_queue *mq = xmq; struct mbuf *m; struct mbuf_list ml; - int s; #ifdef IPSEC int locked = 0; #endif /* IPSEC */ @@ -1464,11 +1463,11 @@ ip6_send_dispatch(void *xmq) } #endif /* IPSEC */ - NET_LOCK(s); + NET_LOCK(); while ((m = ml_dequeue(&ml)) != NULL) { ip6_output(m, NULL, NULL, IPV6_MINMTU, NULL, NULL); } - NET_UNLOCK(s); + NET_UNLOCK(); #ifdef IPSEC if (locked) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index c93413369e4..066cb5c5dfc 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.218 2017/08/10 13:05:58 bluhm Exp $ */ +/* $OpenBSD: nd6.c,v 1.219 2017/08/11 21:24:20 mpi Exp $ */ /* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */ /* @@ -311,21 +311,20 @@ nd6_llinfo_settimer(struct llinfo_nd6 *ln, int secs) void nd6_llinfo_timer(void *arg) { - int s; struct llinfo_nd6 *ln; struct rtentry *rt; struct sockaddr_in6 *dst; struct ifnet *ifp; struct nd_ifinfo *ndi = NULL; - NET_LOCK(s); + NET_LOCK(); ln = (struct llinfo_nd6 *)arg; if ((rt = ln->ln_rt) == NULL) panic("ln->ln_rt == NULL"); if ((ifp = if_get(rt->rt_ifidx)) == NULL) { - NET_UNLOCK(s); + NET_UNLOCK(); return; } ndi = ND_IFINFO(ifp); @@ -409,7 +408,7 @@ nd6_llinfo_timer(void *arg) } if_put(ifp); - NET_UNLOCK(s); + NET_UNLOCK(); } void @@ -457,10 +456,9 @@ void nd6_expire(void *unused) { struct ifnet *ifp; - int s; KERNEL_LOCK(); - NET_LOCK(s); + NET_LOCK(); TAILQ_FOREACH(ifp, &ifnet, if_list) { struct ifaddr *ifa, *nifa; @@ -481,7 +479,7 @@ nd6_expire(void *unused) } } - NET_UNLOCK(s); + NET_UNLOCK(); KERNEL_UNLOCK(); } @@ -1293,9 +1291,8 @@ nd6_slowtimo(void *ignored_arg) { struct nd_ifinfo *nd6if; struct ifnet *ifp; - int s; - NET_LOCK(s); + NET_LOCK(); timeout_add_sec(&nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL); @@ -1313,7 +1310,7 @@ nd6_slowtimo(void *ignored_arg) nd6if->reachable = ND_COMPUTE_RTIME(nd6if->basereachable); } } - NET_UNLOCK(s); + NET_UNLOCK(); } int diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 90086d33d65..7dc48780275 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6_nbr.c,v 1.120 2017/07/28 09:01:09 mpi Exp $ */ +/* $OpenBSD: nd6_nbr.c,v 1.121 2017/08/11 21:24:20 mpi Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -1173,9 +1173,8 @@ nd6_dad_timer(void *xifa) struct in6_ifaddr *ia6 = ifatoia6(ifa); struct dadq *dp; char addr[INET6_ADDRSTRLEN]; - int s; - NET_LOCK(s); + NET_LOCK(); /* Sanity check */ if (ia6 == NULL) { @@ -1266,7 +1265,7 @@ nd6_dad_timer(void *xifa) } done: - NET_UNLOCK(s); + NET_UNLOCK(); } void |