s/splnet/splsoftnet/ in IPv6/IPsec part.

hope I made no mistake (the kernel works fine but I need a regress test)

Suggested by: thorpej
This commit is contained in:
itojun 1999-07-04 02:01:15 +00:00
parent 0516428837
commit 9b74747370
14 changed files with 68 additions and 68 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ah_core.c,v 1.3 1999/07/03 21:30:17 thorpej Exp $ */
/* $NetBSD: ah_core.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -870,7 +870,7 @@ ah4_calccksum(m0, ahdat, algo, sa)
p = mtod(m, u_char *);
s = splnet(); /*XXX crypt algorithms need splnet() */
s = splsoftnet(); /*XXX crypt algorithms need splsoftnet() */
(algo->init)(&algos, sa);
advancewidth = 0; /*safety*/
@ -1084,7 +1084,7 @@ ah6_calccksum(m0, ahdat, algo, sa)
p = mtod(m, u_char *);
s = splnet(); /*XXX crypt algorithms need splnet() */
s = splsoftnet(); /*XXX crypt algorithms need splsoftnet() */
(algo->init)(&algos, sa);
advancewidth = 0; /*safety*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: frag6.c,v 1.3 1999/07/03 21:30:17 thorpej Exp $ */
/* $NetBSD: frag6.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -537,7 +537,7 @@ void
frag6_slowtimo()
{
struct ip6q *q6;
int s = splnet();
int s = splsoftnet();
#if 0
extern struct route_in6 ip6_forward_rt;
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: in6.c,v 1.3 1999/07/03 21:30:18 thorpej Exp $ */
/* $NetBSD: in6.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -1281,7 +1281,7 @@ in6_addmulti(maddr6, ifp, errorp)
struct in6_ifaddr *ia;
struct in6_ifreq ifr;
struct in6_multi *in6m;
int s = splnet();
int s = splsoftnet();
*errorp = 0;
/*
@ -1356,7 +1356,7 @@ in6_delmulti(in6m)
struct in6_multi *in6m;
{
struct in6_ifreq ifr;
int s = splnet();
int s = splsoftnet();
if (--in6m->in6m_refcount == 0) {
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: in6_pcb.c,v 1.5 1999/07/03 21:30:18 thorpej Exp $ */
/* $NetBSD: in6_pcb.c,v 1.6 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -723,7 +723,7 @@ in6_setpeeraddr(in6p, nam)
* Call the protocol specific routine (if any) to report
* any errors for each matching socket.
*
* Must be called at splnet.
* Must be called at splsoftnet.
*/
int
in6_pcbnotify(head, dst, fport_arg, laddr6, lport_arg, cmd, notify)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip6_mroute.c,v 1.3 1999/07/03 21:30:18 thorpej Exp $ */
/* $NetBSD: ip6_mroute.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@ -298,7 +298,7 @@ get_sg_cnt(req)
register struct mf6c *rt;
int s;
s = splnet();
s = splsoftnet();
MF6CFIND(req->src.sin6_addr, req->grp.sin6_addr, rt);
splx(s);
if (rt != NULL) {
@ -423,7 +423,7 @@ ip6_mrouter_done()
struct rtdetq *rte;
int s;
s = splnet();
s = splsoftnet();
/*
* For each phyint in use, disable promiscuous reception of all IPv6
@ -556,14 +556,14 @@ add_m6if(mifcp)
*/
ifr.ifr_addr.sin6_family = AF_INET6;
ifr.ifr_addr.sin6_addr = in6addr_any;
s = splnet();
s = splsoftnet();
error = (*ifp->if_ioctl)(ifp, SIOCADDMULTI, (caddr_t)&ifr);
splx(s);
if (error)
return error;
}
s = splnet();
s = splsoftnet();
mifp->m6_flags = mifcp->mif6c_flags;
mifp->m6_ifp = ifp;
#ifdef notyet
@ -610,7 +610,7 @@ del_m6if(mifip)
if (mifp->m6_ifp == NULL)
return EINVAL;
s = splnet();
s = splsoftnet();
if (!(mifp->m6_flags & MIFF_REGISTER)) {
/*
@ -671,7 +671,7 @@ add_m6fc(mfccp)
mfccp->mf6cc_parent);
#endif
s = splnet();
s = splsoftnet();
rt->mf6c_parent = mfccp->mf6cc_parent;
rt->mf6c_ifset = mfccp->mf6cc_ifset;
splx(s);
@ -681,7 +681,7 @@ add_m6fc(mfccp)
/*
* Find the entry for which the upcall was made and update
*/
s = splnet();
s = splsoftnet();
hash = MF6CHASH(mfccp->mf6cc_origin.sin6_addr,
mfccp->mf6cc_mcastgrp.sin6_addr);
for (rt = mf6ctable[hash], nstl = 0; rt; rt = rt->mf6c_next) {
@ -849,7 +849,7 @@ del_m6fc(mfccp)
ip6_sprintf(&mcastgrp.sin6_addr));
#endif
s = splnet();
s = splsoftnet();
nptr = &mf6ctable[hash];
while ((rt = *nptr) != NULL) {
@ -942,7 +942,7 @@ ip6_mforward(ip6, ifp, m)
/*
* Determine forwarding mifs from the forwarding cache table
*/
s = splnet();
s = splsoftnet();
MF6CFIND(ip6->ip6_src, ip6->ip6_dst, rt);
/* Entry exists, so forward if necessary */
@ -1127,7 +1127,7 @@ expire_upcalls(unused)
int i;
int s;
s = splnet();
s = splsoftnet();
for (i = 0; i < MF6CTBLSIZ; i++) {
if (nexpire[i] == 0)
continue;
@ -1301,7 +1301,7 @@ phyint_send(ip6, mifp, m)
register struct mbuf *mb_copy;
struct ifnet *ifp = mifp->m6_ifp;
int error = 0;
int s = splnet();
int s = splsoftnet();
static struct route_in6 ro6;
struct in6_multi *in6m;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsec.c,v 1.3 1999/07/03 21:30:19 thorpej Exp $ */
/* $NetBSD: ipsec.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -2128,9 +2128,9 @@ ipsec4_output(state, sp, flags)
/*
* There may be the case that SA status will be changed when
* we are refering to one. So calling splnet().
* we are refering to one. So calling splsoftnet().
*/
s = splnet();
s = splsoftnet();
if (isr->mode == IPSEC_MODE_TUNNEL && isr->proxy) {
/*
@ -2472,9 +2472,9 @@ ipsec6_output_tunnel(state, sp, flags)
/*
* There may be the case that SA status will be changed when
* we are refering to one. So calling splnet().
* we are refering to one. So calling splsoftnet().
*/
s = splnet();
s = splsoftnet();
if (isr->mode == IPSEC_MODE_TUNNEL && isr->proxy) {
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: mld6.c,v 1.3 1999/07/03 21:30:19 thorpej Exp $ */
/* $NetBSD: mld6.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@ -137,7 +137,7 @@ void
mld6_start_listening(in6m)
struct in6_multi *in6m;
{
int s = splnet();
int s = splsoftnet();
/*
* (draft-ietf-ipngwg-mld, page 10)
@ -335,7 +335,7 @@ mld6_fasttimeo()
if (!mld6_timers_are_running)
return;
s = splnet();
s = splsoftnet();
mld6_timers_are_running = 0;
IN6_FIRST_MULTI(step, in6m);
while (in6m != NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: nd6.c,v 1.4 1999/07/03 21:30:19 thorpej Exp $ */
/* $NetBSD: nd6.c,v 1.5 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -375,7 +375,7 @@ nd6_timer(ignored_arg)
register struct nd_defrouter *dr;
register struct nd_prefix *pr;
s = splnet();
s = splsoftnet();
timeout(nd6_timer, (caddr_t)0, nd6_prune * hz);
ln = llinfo_nd6.ln_next;
@ -636,7 +636,7 @@ nd6_free(rt)
int s;
in6 = &((struct sockaddr_in6 *)rt_key(rt))->sin6_addr;
s = splnet();
s = splsoftnet();
dr = defrouter_lookup(&((struct sockaddr_in6 *)rt_key(rt))->
sin6_addr,
rt->rt_ifp);
@ -1046,7 +1046,7 @@ nd6_ioctl(cmd, data, ifp)
switch (cmd) {
case SIOCGDRLST_IN6:
bzero(drl, sizeof(*drl));
s = splnet();
s = splsoftnet();
dr = nd_defrouter.lh_first;
while (dr && i < DRLSTSIZ) {
drl->defrouter[i].rtaddr = dr->rtaddr;
@ -1071,7 +1071,7 @@ nd6_ioctl(cmd, data, ifp)
break;
case SIOCGPRLST_IN6:
bzero(prl, sizeof(*prl));
s = splnet();
s = splsoftnet();
pr = nd_prefix.lh_first;
while (pr && i < PRLSTSIZ) {
struct nd_pfxrouter *pfr;
@ -1131,7 +1131,7 @@ nd6_ioctl(cmd, data, ifp)
/* flush all the prefix advertised by routers */
struct nd_prefix *pr, *next;
s = splnet();
s = splsoftnet();
for (pr = nd_prefix.lh_first; pr; pr = next) {
next = pr->ndpr_next;
if (!IN6_IS_ADDR_UNSPECIFIED(&pr->ndpr_addr))
@ -1146,7 +1146,7 @@ nd6_ioctl(cmd, data, ifp)
/* flush all the default routers */
struct nd_defrouter *dr, *next;
s = splnet();
s = splsoftnet();
if ((dr = nd_defrouter.lh_first) != NULL) {
/*
* The first entry of the list may be stored in
@ -1165,7 +1165,7 @@ nd6_ioctl(cmd, data, ifp)
{
struct llinfo_nd6 *ln;
s = splnet();
s = splsoftnet();
if ((rt = nd6_lookup(&nbi->addr, 0, ifp)) == NULL) {
error = EINVAL;
break;
@ -1376,7 +1376,7 @@ static void
nd6_slowtimo(ignored_arg)
void *ignored_arg;
{
int s = splnet();
int s = splsoftnet();
register int i;
register struct nd_ifinfo *nd6if;

View File

@ -1,4 +1,4 @@
/* $NetBSD: nd6_nbr.c,v 1.3 1999/07/03 21:30:19 thorpej Exp $ */
/* $NetBSD: nd6_nbr.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -680,7 +680,7 @@ nd6_na_input(m, off, icmp6len)
int s;
in6 = &((struct sockaddr_in6 *)rt_key(rt))->sin6_addr;
s = splnet();
s = splsoftnet();
dr = defrouter_lookup(in6, rt->rt_ifp);
if (dr)
defrtrlist_del(dr);
@ -961,7 +961,7 @@ nd6_dad_timer(ifa)
struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa;
struct dadq *dp;
s = splnet(); /*XXX*/
s = splsoftnet(); /*XXX*/
/* Sanity check */
if (ia == NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: nd6_rtr.c,v 1.3 1999/07/03 21:30:19 thorpej Exp $ */
/* $NetBSD: nd6_rtr.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -408,7 +408,7 @@ defrouter_addreq(new)
gate.sin6_addr = new->rtaddr;
#if 1
s = splnet();
s = splsoftnet();
(void)rtrequest(RTM_ADD, (struct sockaddr *)&def,
(struct sockaddr *)&gate, (struct sockaddr *)&mask,
RTF_GATEWAY, NULL);
@ -421,7 +421,7 @@ defrouter_addreq(new)
if ((rnh = rt_tables[AF_INET6]) == 0)
return;
s = splnet();
s = splsoftnet();
#if 0
R_Malloc(rt, struct rtentry *, sizeof(*rt));
#else
@ -549,7 +549,7 @@ defrtrlist_update(new)
struct nd_defrouter *new;
{
struct nd_defrouter *dr, *n;
int s = splnet();
int s = splsoftnet();
if ((dr = defrouter_lookup(&new->rtaddr, new->ifp)) != NULL) {
/* entry exists */
@ -679,7 +679,7 @@ prelist_add(pr, dr)
/* xxx ND_OPT_PI_FLAG_ONLINK processing */
s = splnet();
s = splsoftnet();
/* link ndpr_entry to if_prefixlist */
{
struct ifnet *ifp = new->ndpr_ifp;
@ -710,7 +710,7 @@ prelist_remove(pr)
struct nd_pfxrouter *pfr, *next;
int s;
s = splnet();
s = splsoftnet();
/* unlink ndpr_entry from if_prefixlist */
{
struct ifnet *ifp = pr->ndpr_ifp;
@ -757,7 +757,7 @@ prelist_update(new, dr, m)
{
struct in6_ifaddr *ia6 = NULL;
struct nd_prefix *pr;
int s = splnet();
int s = splsoftnet();
int error = 0;
int auth;
struct in6_addrlifetime *lt6;
@ -1463,7 +1463,7 @@ rt6_flush(gateway, ifp)
struct ifnet *ifp;
{
struct radix_node_head *rnh = rt_tables[AF_INET6];
int s = splnet();
int s = splsoftnet();
/* We'll care only link-local addresses */
if (!IN6_IS_ADDR_LINKLOCAL(gateway)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: raw_ip6.c,v 1.3 1999/07/03 21:30:19 thorpej Exp $ */
/* $NetBSD: raw_ip6.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -463,7 +463,7 @@ rip6_usrreq(so, req, m, nam, control, p)
error = EACCES;
break;
}
s = splnet();
s = splsoftnet();
if ((error = soreserve(so, rip6_sendspace, rip6_recvspace)) ||
(error = in6_pcballoc(so, &rawin6pcb))) {
splx(s);

View File

@ -1,4 +1,4 @@
/* $NetBSD: udp6_usrreq.c,v 1.3 1999/07/03 21:30:20 thorpej Exp $ */
/* $NetBSD: udp6_usrreq.c,v 1.4 1999/07/04 02:01:16 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -506,7 +506,7 @@ udp6_output(in6p, m, addr6, control)
/*
* Must block input while temporarily connected.
*/
s = splnet();
s = splsoftnet();
error = in6_pcbconnect(in6p, addr6);
if (error) {
splx(s);
@ -623,7 +623,7 @@ udp6_usrreq(so, req, m, addr6, control, p)
error = EINVAL;
break;
}
s = splnet();
s = splsoftnet();
error = in6_pcballoc(so, &udb6);
splx(s);
if (error)
@ -644,7 +644,7 @@ udp6_usrreq(so, req, m, addr6, control, p)
break;
case PRU_BIND:
s = splnet();
s = splsoftnet();
error = in6_pcbbind(in6p, addr6);
splx(s);
break;
@ -658,7 +658,7 @@ udp6_usrreq(so, req, m, addr6, control, p)
error = EISCONN;
break;
}
s = splnet();
s = splsoftnet();
error = in6_pcbconnect(in6p, addr6);
if (ip6_auto_flowlabel) {
in6p->in6p_flowinfo &= ~IPV6_FLOWLABEL_MASK;
@ -683,7 +683,7 @@ udp6_usrreq(so, req, m, addr6, control, p)
error = ENOTCONN;
break;
}
s = splnet();
s = splsoftnet();
in6_pcbdisconnect(in6p);
bzero((caddr_t)&in6p->in6p_laddr, sizeof(in6p->in6p_laddr));
splx(s);
@ -746,7 +746,7 @@ static void
udp6_detach(in6p)
struct in6pcb *in6p;
{
int s = splnet();
int s = splsoftnet();
if (in6p == udp6_last_in6pcb)
udp6_last_in6pcb = &udb6;

View File

@ -1,4 +1,4 @@
/* $NetBSD: key.c,v 1.5 1999/07/03 21:32:47 thorpej Exp $ */
/* $NetBSD: key.c,v 1.6 1999/07/04 02:01:16 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -29,7 +29,7 @@
* SUCH DAMAGE.
*/
/* KAME $Id: key.c,v 1.5 1999/07/03 21:32:47 thorpej Exp $ */
/* KAME $Id: key.c,v 1.6 1999/07/04 02:01:16 itojun Exp $ */
/*
* This code is referd to RFC 2367,
@ -1768,7 +1768,7 @@ key_delsaidx(saidx)
if (saidx == NULL)
panic("key_delsaidx: NULL pointer is passed.\n");
s = splnet(); /*called from softclock()*/
s = splsoftnet(); /*called from softclock()*/
/* searching all SA registerd in the secindex. */
for (stateidx = 0;
@ -3423,7 +3423,7 @@ key_timehandler(void)
u_int diridx, dir;
int s;
s = splnet(); /*called from softclock()*/
s = splsoftnet(); /*called from softclock()*/
/* SPD */
{
@ -5190,7 +5190,7 @@ key_expire(sa)
{
int s;
s = splnet(); /*called from softclock()*/
s = splsoftnet(); /*called from softclock()*/
/* sanity check */
if (sa == NULL)

View File

@ -1,4 +1,4 @@
/* $NetBSD: keysock.c,v 1.3 1999/07/03 21:32:48 thorpej Exp $ */
/* $NetBSD: keysock.c,v 1.4 1999/07/04 02:01:16 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -29,7 +29,7 @@
* SUCH DAMAGE.
*/
/* KAME @(#)$Id: keysock.c,v 1.3 1999/07/03 21:32:48 thorpej Exp $ */
/* KAME @(#)$Id: keysock.c,v 1.4 1999/07/04 02:01:16 itojun Exp $ */
#if defined(__FreeBSD__) && __FreeBSD__ >= 3
#include "opt_inet.h"
@ -125,7 +125,7 @@ key_usrreq(so, req, m, nam, control, p)
register struct keycb *kp = (struct keycb *)sotorawcb(so);
int s;
s = splnet();
s = splsoftnet();
if (req == PRU_ATTACH) {
MALLOC(kp, struct keycb *, sizeof(*kp), M_PCB, M_WAITOK);
so->so_pcb = (caddr_t)kp;
@ -268,7 +268,7 @@ key_output(m, va_alist)
}
m_copydata(m, 0, len, (caddr_t)msg);
s = splnet(); /*XXX giant lock*/
s = splsoftnet(); /*XXX giant lock*/
if ((len = key_parse(&msg, so, &target)) == 0) {
/* discard. i.e. no need to reply. */
error = 0;