summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2015-02-19 22:24:20 +0000
committerbluhm <bluhm@openbsd.org>2015-02-19 22:24:20 +0000
commitb074d3e90fdcc14d8d0dadfd98325ec22e0a894c (patch)
treefc5f0f243fa128a1a6cf1af2cc40b37701262a81
parentAll other calls to pfxlist_onlink_check() are protected by splsoftnet. (diff)
downloadwireguard-openbsd-b074d3e90fdcc14d8d0dadfd98325ec22e0a894c.tar.xz
wireguard-openbsd-b074d3e90fdcc14d8d0dadfd98325ec22e0a894c.zip
Move the splsoftnet() hiding in the declarations closer to the code.
No binary change; OK mikeb@
-rw-r--r--sys/netinet6/nd6_rtr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 4e40d118c94..166c921522d 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_rtr.c,v 1.97 2015/01/27 03:17:36 dlg Exp $ */
+/* $OpenBSD: nd6_rtr.c,v 1.98 2015/02/19 22:24:20 bluhm Exp $ */
/* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */
/*
@@ -707,10 +707,10 @@ defrouter_reset(void)
void
defrouter_select(void)
{
- int s = splsoftnet();
struct nd_defrouter *dr, *selected_dr = NULL, *installed_dr = NULL;
struct rtentry *rt = NULL;
struct llinfo_nd6 *ln = NULL;
+ int s = splsoftnet();
/*
* This function should be called only when acting as an autoconfigured
@@ -1139,13 +1139,14 @@ prelist_update(struct nd_prefix *new, struct nd_defrouter *dr, struct mbuf *m)
struct ifaddr *ifa;
struct ifnet *ifp = new->ndpr_ifp;
struct nd_prefix *pr;
- int s = splsoftnet();
- int error = 0;
+ int s, error = 0;
int tempaddr_preferred = 0, autoconf = 0, statique = 0;
int auth;
struct in6_addrlifetime lt6_tmp;
char addr[INET6_ADDRSTRLEN];
+ s = splsoftnet();
+
auth = 0;
if (m) {
/*