diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-05-16 12:24:05 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-05-16 12:24:05 +0000 |
commit | fa2ab0aee6d1450ee51511397b771d4a94e7ad9f (patch) | |
tree | ae79f4d305ee44138be7e15dc90eebd2147d2534 /sys/netinet | |
parent | 818939ce9098cde48a67023c939d45c1515e5cfc (diff) |
Replace remaining splsoftassert(IPL_SOFTNET) by NET_ASSERT_LOCKED().
ok visa@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/igmp.c | 8 | ||||
-rw-r--r-- | sys/netinet/in.c | 12 | ||||
-rw-r--r-- | sys/netinet/ip_input.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_ipsp.c | 14 | ||||
-rw-r--r-- | sys/netinet/ip_mroute.c | 12 | ||||
-rw-r--r-- | sys/netinet/ipsec_input.c | 6 | ||||
-rw-r--r-- | sys/netinet/ipsec_output.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_timer.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 |
9 files changed, 34 insertions, 34 deletions
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 12b9561b0ec..ed7bba46a7d 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: igmp.c,v 1.67 2017/05/04 17:58:46 bluhm Exp $ */ +/* $OpenBSD: igmp.c,v 1.68 2017/05/16 12:24:01 mpi Exp $ */ /* $NetBSD: igmp.c,v 1.15 1996/02/13 23:41:25 christos Exp $ */ /* @@ -550,7 +550,7 @@ igmp_fasttimo(void) { struct ifnet *ifp; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); /* * Quick check to see if any work needs to be done, in order @@ -571,7 +571,7 @@ igmp_checktimer(struct ifnet *ifp) struct in_multi *inm; struct ifmaddr *ifma; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); TAILQ_FOREACH(ifma, &ifp->if_maddrlist, ifma_list) { if (ifma->ifma_addr->sa_family != AF_INET) @@ -600,7 +600,7 @@ igmp_slowtimo(void) { struct router_info *rti; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); for (rti = rti_head; rti != 0; rti = rti->rti_next) { if (rti->rti_type == IGMP_v1_ROUTER && diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 7a20e768887..e2f0ed59b7b 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in.c,v 1.137 2017/05/04 15:00:24 bluhm Exp $ */ +/* $OpenBSD: in.c,v 1.138 2017/05/16 12:24:01 mpi Exp $ */ /* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */ /* @@ -210,7 +210,7 @@ in_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, int privileged) int error; int newifaddr; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { if (ifa->ifa_addr->sa_family == AF_INET) { @@ -600,7 +600,7 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin, struct sockaddr_in oldaddr; int error = 0, rterror; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); /* * Always remove the address from the tree to make sure its @@ -700,7 +700,7 @@ in_purgeaddr(struct ifaddr *ifa) struct in_ifaddr *ia = ifatoia(ifa); extern int ifatrash; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); in_ifscrub(ifp, ia); @@ -798,7 +798,7 @@ in_addmulti(struct in_addr *ap, struct ifnet *ifp) struct in_multi *inm; struct ifreq ifr; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); /* * See if address already in list. @@ -860,7 +860,7 @@ in_delmulti(struct in_multi *inm) struct ifreq ifr; struct ifnet *ifp; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); if (--inm->inm_refcnt == 0) { /* diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 780190950cc..cb27fcede64 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.301 2017/05/12 23:05:58 bluhm Exp $ */ +/* $OpenBSD: ip_input.c,v 1.302 2017/05/16 12:24:01 mpi Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -987,7 +987,7 @@ ip_slowtimo(void) { struct ipq *fp, *nfp; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); for (fp = LIST_FIRST(&ipq); fp != NULL; fp = nfp) { nfp = LIST_NEXT(fp, ipq_q); diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c index dd252568ffa..9a5ec57a725 100644 --- a/sys/netinet/ip_ipsp.c +++ b/sys/netinet/ip_ipsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.c,v 1.222 2017/05/06 15:55:15 bluhm Exp $ */ +/* $OpenBSD: ip_ipsp.c,v 1.223 2017/05/16 12:24:01 mpi Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr), @@ -211,7 +211,7 @@ reserve_spi(u_int rdomain, u_int32_t sspi, u_int32_t tspi, u_int32_t spi; int nums; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); /* Don't accept ranges only encompassing reserved SPIs. */ if (sproto != IPPROTO_IPCOMP && @@ -306,7 +306,7 @@ gettdb(u_int rdomain, u_int32_t spi, union sockaddr_union *dst, u_int8_t proto) u_int32_t hashval; struct tdb *tdbp; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); if (tdbh == NULL) return (struct tdb *) NULL; @@ -507,7 +507,7 @@ tdb_walk(u_int rdomain, int (*walker)(struct tdb *, void *, int), void *arg) int i, rval = 0; struct tdb *tdbp, *next; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); if (tdbh == NULL) return ENOENT; @@ -605,7 +605,7 @@ tdb_rehash(void) u_int i, old_hashmask = tdb_hashmask; u_int32_t hashval; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); tdb_hashmask = (tdb_hashmask << 1) | 1; @@ -664,7 +664,7 @@ puttdb(struct tdb *tdbp) { u_int32_t hashval; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); if (tdbh == NULL) { arc4random_buf(&tdbkey, sizeof(tdbkey)); @@ -718,7 +718,7 @@ tdb_delete(struct tdb *tdbp) struct tdb *tdbpp; u_int32_t hashval; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); if (tdbh == NULL) return; diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 593a49a6bc8..e361758a65b 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_mroute.c,v 1.115 2017/05/16 08:32:17 rzalamena Exp $ */ +/* $OpenBSD: ip_mroute.c,v 1.116 2017/05/16 12:24:02 mpi Exp $ */ /* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */ /* @@ -535,7 +535,7 @@ ip_mrouter_done(struct socket *so) struct ifnet *ifp; unsigned int rtableid = inp->inp_rtableid; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); /* Delete all remaining installed multicast routes. */ rtable_walk(rtableid, AF_INET, mrouter_rtwalk_delete, NULL); @@ -659,7 +659,7 @@ add_vif(struct socket *so, struct mbuf *m) int error; unsigned int rtableid = inp->inp_rtableid; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); if (m == NULL || m->m_len < sizeof(struct vifctl)) return (EINVAL); @@ -722,7 +722,7 @@ del_vif(struct socket *so, struct mbuf *m) vifi_t *vifip; unsigned int rtableid = inp->inp_rtableid; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); if (m == NULL || m->m_len < sizeof(vifi_t)) return (EINVAL); @@ -964,7 +964,7 @@ add_mfc(struct socket *so, struct mbuf *m) int mfcctl_size = sizeof(struct mfcctl); unsigned int rtableid = inp->inp_rtableid; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); if (mrt_api_config & MRT_API_FLAGS_ALL) mfcctl_size = sizeof(struct mfcctl2); @@ -1002,7 +1002,7 @@ del_mfc(struct socket *so, struct mbuf *m) struct mfcctl *mp; unsigned int rtableid = inp->inp_rtableid; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); /* * XXX: for deleting MFC entries the information in entries diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c index 8b275147443..08efc2d4c60 100644 --- a/sys/netinet/ipsec_input.c +++ b/sys/netinet/ipsec_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_input.c,v 1.151 2017/05/12 23:05:58 bluhm Exp $ */ +/* $OpenBSD: ipsec_input.c,v 1.152 2017/05/16 12:24:02 mpi Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -119,7 +119,7 @@ ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto, char buf[INET6_ADDRSTRLEN]; #endif - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); IPSEC_ISTAT(espstat.esps_input, ahstat.ahs_input, ipcompstat.ipcomps_input); @@ -799,7 +799,7 @@ udpencap_ctlinput(int cmd, struct sockaddr *sa, u_int rdomain, void *v) struct sockaddr_in dst, src; union sockaddr_union *su_dst, *su_src; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); icp = (struct icmp *)((caddr_t) ip - offsetof(struct icmp, icmp_ip)); mtu = ntohs(icp->icmp_nextmtu); diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c index 686f55c5ae4..61af386ed0c 100644 --- a/sys/netinet/ipsec_output.c +++ b/sys/netinet/ipsec_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_output.c,v 1.66 2017/04/06 14:25:18 dhill Exp $ */ +/* $OpenBSD: ipsec_output.c,v 1.67 2017/05/16 12:24:02 mpi Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -568,7 +568,7 @@ ipsec_adjust_mtu(struct mbuf *m, u_int32_t mtu) struct m_tag *mtag; ssize_t adjust; - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); for (mtag = m_tag_find(m, PACKET_TAG_IPSEC_OUT_DONE, NULL); mtag; mtag = m_tag_find(m, PACKET_TAG_IPSEC_OUT_DONE, mtag)) { diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 72854fa11bd..3d4bc5d0600 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_timer.c,v 1.55 2017/04/19 15:21:54 bluhm Exp $ */ +/* $OpenBSD: tcp_timer.c,v 1.56 2017/05/16 12:24:02 mpi Exp $ */ /* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */ /* @@ -129,7 +129,7 @@ tcp_delack(void *arg) void tcp_slowtimo(void) { - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); tcp_maxidle = TCPTV_KEEPCNT * tcp_keepintvl; tcp_iss += TCP_ISSINCR2/PR_SLOWHZ; /* increment iss */ diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 1ac6d1322f4..c3ab8a2e67b 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.149 2017/05/13 17:41:57 bluhm Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.150 2017/05/16 12:24:02 mpi Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -734,7 +734,7 @@ tcp_ident(void *oldp, size_t *oldlenp, void *newp, size_t newlen, int dodrop) struct in6_addr f6, l6; #endif - splsoftassert(IPL_SOFTNET); + NET_ASSERT_LOCKED(); if (dodrop) { if (oldp != NULL || *oldlenp != 0) |