diff --git a/sys/netinet/if_atm.c b/sys/netinet/if_atm.c index 75c52a93865d..c2f05ca4f9a6 100644 --- a/sys/netinet/if_atm.c +++ b/sys/netinet/if_atm.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_atm.c,v 1.15 2002/06/09 16:33:37 itojun Exp $ */ +/* $NetBSD: if_atm.c,v 1.16 2002/09/11 02:46:42 itojun Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_atm.c,v 1.15 2002/06/09 16:33:37 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atm.c,v 1.16 2002/09/11 02:46:42 itojun Exp $"); #include "opt_inet.h" #include "opt_natm.h" @@ -270,7 +270,7 @@ atmresolve(rt, m, dst, desten) if (sdl->sdl_family == AF_LINK && sdl->sdl_alen == sizeof(*desten)) { bcopy(LLADDR(sdl), desten, sdl->sdl_alen); - return(1); /* ok, go for it! */ + return (1); /* ok, go for it! */ } /* @@ -281,6 +281,6 @@ atmresolve(rt, m, dst, desten) bad: m_freem(m); - return(0); + return (0); } #endif /* INET */ diff --git a/sys/netinet/in.c b/sys/netinet/in.c index d67c247a80be..e0deec555519 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.79 2002/09/04 03:45:01 itojun Exp $ */ +/* $NetBSD: in.c,v 1.80 2002/09/11 02:46:43 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -102,7 +102,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.79 2002/09/04 03:45:01 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.80 2002/09/11 02:46:43 itojun Exp $"); #include "opt_inet.h" #include "opt_inet_conf.h" @@ -329,7 +329,7 @@ in_control(so, cmd, data, ifp, p) case SIOCALIFADDR: case SIOCDLIFADDR: if (p == 0 || (error = suser(p->p_ucred, &p->p_acflag))) - return(EPERM); + return (EPERM); /*fall through*/ case SIOCGLIFADDR: if (!ifp) @@ -535,7 +535,7 @@ in_control(so, cmd, data, ifp, p) return (EOPNOTSUPP); error = (*ifp->if_ioctl)(ifp, cmd, data); in_setmaxmtu(); - return(error); + return (error); } return (0); } diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c index b927b095cb73..b7b50053eda0 100644 --- a/sys/netinet/in_gif.c +++ b/sys/netinet/in_gif.c @@ -1,4 +1,4 @@ -/* $NetBSD: in_gif.c,v 1.29 2002/08/14 00:23:29 itojun Exp $ */ +/* $NetBSD: in_gif.c,v 1.30 2002/09/11 02:46:43 itojun Exp $ */ /* $KAME: in_gif.c,v 1.66 2001/07/29 04:46:09 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.29 2002/08/14 00:23:29 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.30 2002/09/11 02:46:43 itojun Exp $"); #include "opt_inet.h" #include "opt_iso.h" @@ -212,7 +212,7 @@ in_gif_output(ifp, family, m) } error = ip_output(m, NULL, &sc->gif_ro, 0, NULL); - return(error); + return (error); } void diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c index cead144b918d..e43616f3d0e9 100644 --- a/sys/netinet/ip_gre.c +++ b/sys/netinet/ip_gre.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_gre.c,v 1.21 2002/08/14 00:23:30 itojun Exp $ */ +/* $NetBSD: ip_gre.c,v 1.22 2002/09/11 02:46:43 itojun Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_gre.c,v 1.21 2002/08/14 00:23:30 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_gre.c,v 1.22 2002/09/11 02:46:43 itojun Exp $"); #include "gre.h" #if NGRE > 0 @@ -177,7 +177,7 @@ gre_input2(struct mbuf *m ,int hlen, u_char proto) hlen += 4; /* We don't support routing fields (variable length) */ if (flags & GRE_RP) - return(0); + return (0); if (flags & GRE_KP) hlen += 4; if (flags & GRE_SP) @@ -202,12 +202,12 @@ gre_input2(struct mbuf *m ,int hlen, u_char proto) case ETHERTYPE_IPV6: /* FALLTHROUGH */ default: /* others not yet supported */ - return(0); + return (0); } break; default: /* others not yet supported */ - return(0); + return (0); } m->m_data += hlen; @@ -238,7 +238,7 @@ gre_input2(struct mbuf *m ,int hlen, u_char proto) } splx(s); - return(1); /* packet is done, no further processing needed */ + return (1); /* packet is done, no further processing needed */ } /* diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 067c57af1fe1..4f9b5ea8b398 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.156 2002/09/11 02:41:19 itojun Exp $ */ +/* $NetBSD: ip_input.c,v 1.157 2002/09/11 02:46:43 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -102,7 +102,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.156 2002/09/11 02:41:19 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.157 2002/09/11 02:46:43 itojun Exp $"); #include "opt_gateway.h" #include "opt_pfil_hooks.h" @@ -1889,13 +1889,13 @@ ip_sysctl(name, namelen, oldp, oldlenp, newp, newlen) &hostzeroisbroadcast)); #if NGIF > 0 case IPCTL_GIF_TTL: - return(sysctl_int(oldp, oldlenp, newp, newlen, + return (sysctl_int(oldp, oldlenp, newp, newlen, &ip_gif_ttl)); #endif #if NGRE > 0 case IPCTL_GRE_TTL: - return(sysctl_int(oldp, oldlenp, newp, newlen, + return (sysctl_int(oldp, oldlenp, newp, newlen, &ip_gre_ttl)); #endif diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 3977ba6623a2..d739400c123f 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_output.c,v 1.100 2002/08/14 00:23:32 itojun Exp $ */ +/* $NetBSD: ip_output.c,v 1.101 2002/09/11 02:46:43 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -102,7 +102,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.100 2002/08/14 00:23:32 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.101 2002/09/11 02:46:43 itojun Exp $"); #include "opt_pfil_hooks.h" #include "opt_ipsec.h" @@ -825,7 +825,7 @@ ip_optlen(inp) struct mbuf *m = inp->inp_options; if (m && m->m_len > offsetof(struct ipoption, ipopt_dst)) - return(m->m_len - offsetof(struct ipoption, ipopt_dst)); + return (m->m_len - offsetof(struct ipoption, ipopt_dst)); else return 0; } diff --git a/sys/netinet6/ah_output.c b/sys/netinet6/ah_output.c index c4323cdb9ad2..baa58835404b 100644 --- a/sys/netinet6/ah_output.c +++ b/sys/netinet6/ah_output.c @@ -1,4 +1,4 @@ -/* $NetBSD: ah_output.c,v 1.18 2002/08/09 07:01:21 itojun Exp $ */ +/* $NetBSD: ah_output.c,v 1.19 2002/09/11 02:46:44 itojun Exp $ */ /* $KAME: ah_output.c,v 1.31 2001/07/26 06:53:15 jinmei Exp $ */ /* @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ah_output.c,v 1.18 2002/08/09 07:01:21 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ah_output.c,v 1.19 2002/09/11 02:46:44 itojun Exp $"); #include "opt_inet.h" @@ -345,7 +345,7 @@ ah_hdrlen(sav) ahlen = plen + sizeof(struct newah); } - return(ahlen); + return (ahlen); } #ifdef INET6 @@ -493,7 +493,7 @@ ah6_output(m, nexthdrp, md, isr) } ipsec6stat.out_ahhist[sav->alg_auth]++; - return(error); + return (error); } #endif diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index 3a9d8829acd6..6d2fc1e2f7de 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -1,4 +1,4 @@ -/* $NetBSD: frag6.c,v 1.21 2002/09/11 02:41:23 itojun Exp $ */ +/* $NetBSD: frag6.c,v 1.22 2002/09/11 02:46:44 itojun Exp $ */ /* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.21 2002/09/11 02:41:23 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.22 2002/09/11 02:46:44 itojun Exp $"); #include #include @@ -340,14 +340,14 @@ frag6_input(mp, offp, proto) offset - sizeof(struct ip6_frag) + offsetof(struct ip6_frag, ip6f_offlg)); IP6Q_UNLOCK(); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } } else if (fragoff + frgpartlen > IPV6_MAXPACKET) { icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset - sizeof(struct ip6_frag) + offsetof(struct ip6_frag, ip6f_offlg)); IP6Q_UNLOCK(); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } /* * If it's the first fragment, do the above check for each diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index cfca5f7e7466..5f70dec5c4aa 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,4 +1,4 @@ -/* $NetBSD: icmp6.c,v 1.85 2002/07/30 23:27:15 itojun Exp $ */ +/* $NetBSD: icmp6.c,v 1.86 2002/09/11 02:46:44 itojun Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.85 2002/07/30 23:27:15 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.86 2002/09/11 02:46:44 itojun Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -892,7 +892,7 @@ icmp6_input(mp, offp, proto) deliver: if (icmp6_notify_error(m, off, icmp6len, code)) { /* In this case, m should've been freed. */ - return(IPPROTO_DONE); + return (IPPROTO_DONE); } break; @@ -939,7 +939,7 @@ icmp6_notify_error(m, off, icmp6len, code) sizeof(*icmp6) + sizeof(struct ip6_hdr)); if (icmp6 == NULL) { icmp6stat.icp6s_tooshort++; - return(-1); + return (-1); } #endif eip6 = (struct ip6_hdr *)(icmp6 + 1); @@ -976,7 +976,7 @@ icmp6_notify_error(m, off, icmp6len, code) eoff, sizeof(*eh)); if (eh == NULL) { icmp6stat.icp6s_tooshort++; - return(-1); + return (-1); } #endif @@ -1005,7 +1005,7 @@ icmp6_notify_error(m, off, icmp6len, code) eoff, sizeof(*rth)); if (rth == NULL) { icmp6stat.icp6s_tooshort++; - return(-1); + return (-1); } #endif rthlen = (rth->ip6r_len + 1) << 3; @@ -1031,7 +1031,7 @@ icmp6_notify_error(m, off, icmp6len, code) eoff, rthlen); if (rth0 == NULL) { icmp6stat.icp6s_tooshort++; - return(-1); + return (-1); } #endif /* just ignore a bogus header */ @@ -1054,7 +1054,7 @@ icmp6_notify_error(m, off, icmp6len, code) eoff, sizeof(*fh)); if (fh == NULL) { icmp6stat.icp6s_tooshort++; - return(-1); + return (-1); } #endif /* @@ -1089,7 +1089,7 @@ icmp6_notify_error(m, off, icmp6len, code) sizeof(*icmp6) + sizeof(struct ip6_hdr)); if (icmp6 == NULL) { icmp6stat.icp6s_tooshort++; - return(-1); + return (-1); } #endif @@ -1157,11 +1157,11 @@ icmp6_notify_error(m, off, icmp6len, code) &ip6cp); } } - return(0); + return (0); freeit: m_freem(m); - return(-1); + return (-1); } void @@ -1450,7 +1450,7 @@ ni6_input(m, off) MGETHDR(n, M_DONTWAIT, m->m_type); if (n == NULL) { m_freem(m); - return(NULL); + return (NULL); } M_COPY_PKTHDR(n, m); /* just for rcvif */ if (replylen > MHLEN) { @@ -1527,13 +1527,13 @@ ni6_input(m, off) nni6->ni_type = ICMP6_NI_REPLY; m_freem(m); - return(n); + return (n); bad: m_freem(m); if (n) m_freem(n); - return(NULL); + return (NULL); } #undef hostnamelen @@ -1740,7 +1740,7 @@ ni6_addrs(ni6, m, ifpp, subj) switch (ni6->ni_code) { case ICMP6_NI_SUBJ_IPV6: if (subj == NULL) /* must be impossible... */ - return(0); + return (0); subj_ip6 = (struct sockaddr_in6 *)subj; break; default: @@ -1748,7 +1748,7 @@ ni6_addrs(ni6, m, ifpp, subj) * XXX: we only support IPv6 subject address for * this Qtype. */ - return(0); + return (0); } } @@ -1807,13 +1807,13 @@ ni6_addrs(ni6, m, ifpp, subj) } if (iffound) { *ifpp = ifp; - return(addrsofif); + return (addrsofif); } addrs += addrsofif; } - return(addrs); + return (addrs); } static int @@ -1833,7 +1833,7 @@ ni6_store_addrs(ni6, nni6, ifp0, resid) long time_second = time.tv_sec; if (ifp0 == NULL && !(niflags & NI_NODEADDR_FLAG_ALL)) - return(0); /* needless to copy */ + return (0); /* needless to copy */ again: @@ -1898,7 +1898,7 @@ ni6_store_addrs(ni6, nni6, ifp0, resid) */ nni6->ni_flags |= NI_NODEADDR_FLAG_TRUNCATE; - return(copied); + return (copied); } /* @@ -1957,7 +1957,7 @@ ni6_store_addrs(ni6, nni6, ifp0, resid) goto again; } - return(copied); + return (copied); } /* @@ -2843,7 +2843,7 @@ icmp6_ctloutput(op, so, level, optname, mp) break; } - return(error); + return (error); } /* diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 1a0fe3fcddef..a4be85d49c08 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.67 2002/06/11 07:28:05 itojun Exp $ */ +/* $NetBSD: in6.c,v 1.68 2002/09/11 02:46:44 itojun Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.67 2002/06/11 07:28:05 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.68 2002/09/11 02:46:44 itojun Exp $"); #include "opt_inet.h" @@ -342,10 +342,10 @@ in6_mask2len(mask, lim0) */ if (p < lim) { if (y != 0 && (*p & (0x00ff >> y)) != 0) - return(-1); + return (-1); for (p = p + 1; p < lim; p++) if (*p != 0) - return(-1); + return (-1); } return x * 8 + y; @@ -380,7 +380,7 @@ in6_control(so, cmd, data, ifp, p) } if (ifp == NULL) - return(EOPNOTSUPP); + return (EOPNOTSUPP); switch (cmd) { case SIOCSNDFLUSH_IN6: @@ -389,7 +389,7 @@ in6_control(so, cmd, data, ifp, p) case SIOCSDEFIFACE_IN6: case SIOCSIFINFO_FLAGS: if (!privileged) - return(EPERM); + return (EPERM); /* FALLTHROUGH */ case OSIOCGIFINFO_IN6: case SIOCGIFINFO_IN6: @@ -397,7 +397,7 @@ in6_control(so, cmd, data, ifp, p) case SIOCGPRLST_IN6: case SIOCGNBRINFO_IN6: case SIOCGDEFIFACE_IN6: - return(nd6_ioctl(cmd, data, ifp)); + return (nd6_ioctl(cmd, data, ifp)); } switch (cmd) { @@ -410,14 +410,14 @@ in6_control(so, cmd, data, ifp, p) log(LOG_NOTICE, "prefix ioctls are now invalidated. " "please use ifconfig.\n"); - return(EOPNOTSUPP); + return (EOPNOTSUPP); } switch (cmd) { case SIOCALIFADDR: case SIOCDLIFADDR: if (!privileged) - return(EPERM); + return (EPERM); /* FALLTHROUGH */ case SIOCGLIFADDR: return in6_lifaddr_ioctl(so, cmd, data, ifp, p); @@ -471,12 +471,12 @@ in6_control(so, cmd, data, ifp, p) htons(ifp->if_index); } else if (sa6->sin6_addr.s6_addr16[1] != htons(ifp->if_index)) { - return(EINVAL); /* link ID contradicts */ + return (EINVAL); /* link ID contradicts */ } if (sa6->sin6_scope_id) { if (sa6->sin6_scope_id != (u_int32_t)ifp->if_index) - return(EINVAL); + return (EINVAL); sa6->sin6_scope_id = 0; /* XXX: good way? */ } } @@ -492,7 +492,7 @@ in6_control(so, cmd, data, ifp, p) * Since IPv6 allows a node to assign multiple addresses * on a single interface, SIOCSIFxxx ioctls are deprecated. */ - return(EINVAL); + return (EINVAL); case SIOCDIFADDR_IN6: /* @@ -503,7 +503,7 @@ in6_control(so, cmd, data, ifp, p) * first one" semantics to be not preferable. */ if (ia == NULL) - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); /* FALLTHROUGH */ case SIOCAIFADDR_IN6: /* @@ -512,9 +512,9 @@ in6_control(so, cmd, data, ifp, p) */ if (ifra->ifra_addr.sin6_family != AF_INET6 || ifra->ifra_addr.sin6_len != sizeof(struct sockaddr_in6)) - return(EAFNOSUPPORT); + return (EAFNOSUPPORT); if (!privileged) - return(EPERM); + return (EPERM); break; @@ -527,16 +527,16 @@ in6_control(so, cmd, data, ifp, p) case SIOCGIFALIFETIME_IN6: /* must think again about its semantics */ if (ia == NULL) - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); break; case SIOCSIFALIFETIME_IN6: { struct in6_addrlifetime *lt; if (!privileged) - return(EPERM); + return (EPERM); if (ia == NULL) - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); /* sanity for overflow - beware unsigned */ lt = &ifr->ifr_ifru.ifru_lifetime; if (lt->ia6t_vltime != ND6_INFINITE_LIFETIME @@ -559,7 +559,7 @@ in6_control(so, cmd, data, ifp, p) case SIOCGIFDSTADDR_IN6: if ((ifp->if_flags & IFF_POINTOPOINT) == 0) - return(EINVAL); + return (EINVAL); /* * XXX: should we check if ifa_dstaddr is NULL and return * an error? @@ -658,7 +658,7 @@ in6_control(so, cmd, data, ifp, p) * and link it to the list. */ if ((error = in6_update_ifa(ifp, ifra, ia)) != 0) - return(error); + return (error); if ((ia = in6ifa_ifpwithaddr(ifp, &ifra->ifra_addr.sin6_addr)) == NULL) { /* @@ -713,11 +713,11 @@ in6_control(so, cmd, data, ifp, p) * interface route. */ if ((error = nd6_prelist_add(&pr0, NULL, &pr)) != 0) - return(error); + return (error); if (pr == NULL) { log(LOG_ERR, "nd6_prelist_add succeeded but " "no prefix\n"); - return(EINVAL); /* XXX panic here? */ + return (EINVAL); /* XXX panic here? */ } } if ((ia->ia6_flags & IN6_IFF_AUTOCONF) && @@ -785,11 +785,11 @@ in6_control(so, cmd, data, ifp, p) default: if (ifp == NULL || ifp->if_ioctl == 0) - return(EOPNOTSUPP); - return((*ifp->if_ioctl)(ifp, cmd, data)); + return (EOPNOTSUPP); + return ((*ifp->if_ioctl)(ifp, cmd, data)); } - return(0); + return (0); } /* @@ -814,7 +814,7 @@ in6_update_ifa(ifp, ifra, ia) /* Validate parameters */ if (ifp == NULL || ifra == NULL) /* this maybe redundant */ - return(EINVAL); + return (EINVAL); /* * The destination address for a p2p link must have a family @@ -823,13 +823,13 @@ in6_update_ifa(ifp, ifra, ia) if ((ifp->if_flags & IFF_POINTOPOINT) != 0 && ifra->ifra_dstaddr.sin6_family != AF_INET6 && ifra->ifra_dstaddr.sin6_family != AF_UNSPEC) - return(EAFNOSUPPORT); + return (EAFNOSUPPORT); /* * validate ifra_prefixmask. don't check sin6_family, netmask * does not carry fields other than sin6_len. */ if (ifra->ifra_prefixmask.sin6_len > sizeof(struct sockaddr_in6)) - return(EINVAL); + return (EINVAL); /* * Because the IPv6 address architecture is classless, we require * users to specify a (non 0) prefix length (mask) for a new address. @@ -837,13 +837,13 @@ in6_update_ifa(ifp, ifra, ia) * reject a non-consecutive mask. */ if (ia == NULL && ifra->ifra_prefixmask.sin6_len == 0) - return(EINVAL); + return (EINVAL); if (ifra->ifra_prefixmask.sin6_len != 0) { plen = in6_mask2len(&ifra->ifra_prefixmask.sin6_addr, (u_char *)&ifra->ifra_prefixmask + ifra->ifra_prefixmask.sin6_len); if (plen <= 0) - return(EINVAL); + return (EINVAL); } else { /* * In this case, ia must not be NULL. We just use its prefix @@ -870,7 +870,7 @@ in6_update_ifa(ifp, ifra, ia) htons(ifp->if_index); } else if (dst6.sin6_addr.s6_addr16[1] != htons(ifp->if_index)) { - return(EINVAL); /* ifid contradicts */ + return (EINVAL); /* ifid contradicts */ } } } @@ -888,7 +888,7 @@ in6_update_ifa(ifp, ifra, ia) /* XXX: noisy message */ nd6log((LOG_INFO, "in6_update_ifa: a destination can be " "specified for a p2p or a loopback IF only\n")); - return(EINVAL); + return (EINVAL); } if (plen != 128) { nd6log((LOG_INFO, "in6_update_ifa: prefixlen should be " @@ -907,14 +907,14 @@ in6_update_ifa(ifp, ifra, ia) 0xffffffff; plen = 128; #else - return(EINVAL); + return (EINVAL); #endif } } /* lifetime consistency check */ lt = &ifra->ifra_lifetime; if (lt->ia6t_pltime > lt->ia6t_vltime) - return(EINVAL); + return (EINVAL); if (lt->ia6t_vltime == 0) { /* * the following log might be noisy, but this is a typical @@ -925,7 +925,7 @@ in6_update_ifa(ifp, ifra, ia) ip6_sprintf(&ifra->ifra_addr.sin6_addr))); if (ia == NULL) - return(0); /* there's nothing to do */ + return (0); /* there's nothing to do */ } /* @@ -1234,7 +1234,7 @@ in6_update_ifa(ifp, ifra, ia) nd6_dad_start((struct ifaddr *)ia, NULL); } - return(error); + return (error); unlink: /* @@ -1243,7 +1243,7 @@ in6_update_ifa(ifp, ifra, ia) */ if (hostIsNew) in6_unlink_ifa(ia, ifp); - return(error); + return (error); cleanup: in6_purgeaddr(&ia->ia_ifa); @@ -1658,7 +1658,7 @@ in6_ifinit(ifp, ia, sin6, newhost) if (ifacount <= 1 && ifp->if_ioctl && (error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia))) { splx(s); - return(error); + return (error); } splx(s); @@ -1676,7 +1676,7 @@ in6_ifinit(ifp, ia, sin6, newhost) if (plen == 128 && ia->ia_dstaddr.sin6_family == AF_INET6) { if ((error = rtinit(&(ia->ia_ifa), (int)RTM_ADD, RTF_UP | RTF_HOST)) != 0) - return(error); + return (error); ia->ia_flags |= IFA_ROUTE; } @@ -1690,7 +1690,7 @@ in6_ifinit(ifp, ia, sin6, newhost) if (ifp->if_flags & IFF_MULTICAST) in6_restoremkludge(ia, ifp); - return(error); + return (error); } /* @@ -1849,7 +1849,7 @@ in6_addmulti(maddr6, ifp, errorp) if (in6m == NULL) { splx(s); *errorp = ENOBUFS; - return(NULL); + return (NULL); } in6m->in6m_addr = *maddr6; in6m->in6m_ifp = ifp; @@ -1859,7 +1859,7 @@ in6_addmulti(maddr6, ifp, errorp) free(in6m, M_IPMADDR); splx(s); *errorp = EADDRNOTAVAIL; /* appropriate? */ - return(NULL); + return (NULL); } in6m->in6m_ia = ia; IFAREF(&ia->ia_ifa); /* gain a reference */ @@ -1883,7 +1883,7 @@ in6_addmulti(maddr6, ifp, errorp) free(in6m, M_IPMADDR); IFAFREE(&ia->ia_ifa); splx(s); - return(NULL); + return (NULL); } /* * Let MLD6 know that we have joined a new IP6 multicast @@ -1892,7 +1892,7 @@ in6_addmulti(maddr6, ifp, errorp) mld6_start_listening(in6m); } splx(s); - return(in6m); + return (in6m); } /* @@ -1992,7 +1992,7 @@ in6ifa_ifpforlinklocal(ifp, ignoreflags) } } - return((struct in6_ifaddr *)ifa); + return ((struct in6_ifaddr *)ifa); } @@ -2016,7 +2016,7 @@ in6ifa_ifpwithaddr(ifp, addr) break; } - return((struct in6_ifaddr *)ifa); + return ((struct in6_ifaddr *)ifa); } /* @@ -2070,7 +2070,7 @@ ip6_sprintf(addr) a++; } *--cp = 0; - return(ip6buf[ip6round]); + return (ip6buf[ip6round]); } /* @@ -2141,17 +2141,17 @@ in6_addr2scopeid(ifp, addr) switch (scope) { case IPV6_ADDR_SCOPE_NODELOCAL: - return(-1); /* XXX: is this an appropriate value? */ + return (-1); /* XXX: is this an appropriate value? */ case IPV6_ADDR_SCOPE_LINKLOCAL: /* XXX: we do not distinguish between a link and an I/F. */ - return(ifp->if_index); + return (ifp->if_index); case IPV6_ADDR_SCOPE_SITELOCAL: - return(0); /* XXX: invalid. */ + return (0); /* XXX: invalid. */ default: - return(0); /* XXX: treat as global. */ + return (0); /* XXX: treat as global. */ } } @@ -2168,12 +2168,12 @@ in6_is_addr_deprecated(sa6) ia->ia_addr.sin6_scope_id == sa6->sin6_scope_id && #endif (ia->ia6_flags & IN6_IFF_DEPRECATED) != 0) - return(1); /* true */ + return (1); /* true */ /* XXX: do we still have to go thru the rest of the list? */ } - return(0); /* false */ + return (0); /* false */ } /* @@ -2212,19 +2212,19 @@ in6_are_prefix_equal(p1, p2, len) if (0 > len || len > 128) { log(LOG_ERR, "in6_are_prefix_equal: invalid prefix length(%d)\n", len); - return(0); + return (0); } bytelen = len / 8; bitlen = len % 8; if (bcmp(&p1->s6_addr, &p2->s6_addr, bytelen)) - return(0); + return (0); if (p1->s6_addr[bytelen] >> (8 - bitlen) != p2->s6_addr[bytelen] >> (8 - bitlen)) - return(0); + return (0); - return(1); + return (1); } void @@ -2267,7 +2267,7 @@ in6_ifawithscope(oifp, dst) if (oifp == NULL) { printf("in6_ifawithscope: output interface is not specified\n"); - return(NULL); + return (NULL); } /* @@ -2497,7 +2497,7 @@ in6_ifawithscope(oifp, dst) ip6stat.ip6s_sources_deprecated[best_scope]++; } - return(ifa_best); + return (ifa_best); } /* @@ -2555,7 +2555,7 @@ in6_ifawithifp(ifp, dst) } } if (besta) - return(besta); + return (besta); for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = ifa->ifa_list.tqe_next) { @@ -2617,7 +2617,7 @@ in6if_do_dad(ifp) struct ifnet *ifp; { if ((ifp->if_flags & IFF_LOOPBACK) != 0) - return(0); + return (0); switch (ifp->if_type) { case IFT_FAITH: @@ -2627,7 +2627,7 @@ in6if_do_dad(ifp) * interfaces. We should even omit it, because loop-backed * NS would confuse the DAD procedure. */ - return(0); + return (0); default: /* * Our DAD routine requires the interface up and running. @@ -2640,9 +2640,9 @@ in6if_do_dad(ifp) */ if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) - return(0); + return (0); - return(1); + return (1); } } diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 2c32ebb37011..b58f14e6f4ec 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_gif.c,v 1.29 2002/06/09 14:43:12 itojun Exp $ */ +/* $NetBSD: in6_gif.c,v 1.30 2002/09/11 02:46:45 itojun Exp $ */ /* $KAME: in6_gif.c,v 1.62 2001/07/29 04:27:25 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.29 2002/06/09 14:43:12 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.30 2002/09/11 02:46:45 itojun Exp $"); #include "opt_inet.h" #include "opt_iso.h" @@ -222,7 +222,7 @@ in6_gif_output(ifp, family, m) error = ip6_output(m, 0, &sc->gif_ro6, 0, 0, NULL); #endif - return(error); + return (error); } int in6_gif_input(mp, offp, proto) diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 365d3256514b..e60c00b73a2b 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_ifattach.c,v 1.50 2002/09/11 02:41:24 itojun Exp $ */ +/* $NetBSD: in6_ifattach.c,v 1.51 2002/09/11 02:46:45 itojun Exp $ */ /* $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.50 2002/09/11 02:41:24 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.51 2002/09/11 02:46:45 itojun Exp $"); #include #include @@ -355,7 +355,7 @@ in6_ifattach_linklocal(ifp, altifp) if (get_ifid(ifp, altifp, &ifra.ifra_addr.sin6_addr) != 0) { nd6log((LOG_ERR, "%s: no ifid available\n", if_name(ifp))); - return(-1); + return (-1); } } @@ -395,7 +395,7 @@ in6_ifattach_linklocal(ifp, altifp) "configure a link-local address on %s " "(errno=%d)\n", if_name(ifp), error)); - return(-1); + return (-1); } /* @@ -450,7 +450,7 @@ in6_ifattach_linklocal(ifp, altifp) */ if (nd6_prefix_lookup(&pr0) == NULL) { if ((error = nd6_prelist_add(&pr0, NULL, NULL)) != 0) - return(error); + return (error); } return 0; @@ -502,7 +502,7 @@ in6_ifattach_loopback(ifp) nd6log((LOG_ERR, "in6_ifattach_loopback: failed to configure " "the loopback address on %s (errno=%d)\n", if_name(ifp), error)); - return(-1); + return (-1); } return 0; diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index aa27cb175cb3..8fb24b71ddf9 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_pcb.c,v 1.51 2002/08/26 14:25:00 itojun Exp $ */ +/* $NetBSD: in6_pcb.c,v 1.52 2002/09/11 02:46:45 itojun Exp $ */ /* $KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.51 2002/08/26 14:25:00 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.52 2002/09/11 02:46:45 itojun Exp $"); #include "opt_ipsec.h" @@ -124,7 +124,7 @@ in6_pcballoc(so, head) MALLOC(in6p, struct in6pcb *, sizeof(*in6p), M_PCB, M_NOWAIT); if (in6p == NULL) - return(ENOBUFS); + return (ENOBUFS); bzero((caddr_t)in6p, sizeof(*in6p)); in6p->in6p_head = head; in6p->in6p_socket = so; @@ -146,7 +146,7 @@ in6_pcballoc(so, head) if (ip6_v6only) in6p->in6p_flags |= IN6P_IPV6_V6ONLY; so->so_pcb = (caddr_t)in6p; - return(0); + return (0); } int @@ -162,7 +162,7 @@ in6_pcbbind(in6p, nam, p) int wild = 0, reuseport = (so->so_options & SO_REUSEPORT); if (in6p->in6p_lport || !IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr)) - return(EINVAL); + return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0 && ((so->so_proto->pr_flags & PR_CONNREQUIRED) == 0 || (so->so_options & SO_ACCEPTCONN) == 0)) @@ -170,13 +170,13 @@ in6_pcbbind(in6p, nam, p) if (nam) { sin6 = mtod(nam, struct sockaddr_in6 *); if (nam->m_len != sizeof(*sin6)) - return(EINVAL); + return (EINVAL); /* * We should check the family, but old programs * incorrectly fail to intialize it. */ if (sin6->sin6_family != AF_INET6) - return(EAFNOSUPPORT); + return (EAFNOSUPPORT); /* * since we do not check port number duplicate with IPv4 space, @@ -185,7 +185,7 @@ in6_pcbbind(in6p, nam, p) * other users. */ if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); /* KAME hack: embed scopeid */ if (in6_embedscope(&sin6->sin6_addr, sin6, in6p, NULL) != 0) @@ -222,7 +222,7 @@ in6_pcbbind(in6p, nam, p) sin6->sin6_port = 0; /* yech... */ if ((in6p->in6p_flags & IN6P_FAITH) == 0 && (ia = ifa_ifwithaddr((struct sockaddr *)sin6)) == 0) - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); /* * bind to an anycast address might accidentally @@ -240,7 +240,7 @@ in6_pcbbind(in6p, nam, p) if (ia && ((struct in6_ifaddr *)ia)->ia6_flags & (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|IN6_IFF_DETACHED)) - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); } if (lport) { #ifndef IPNOPRIVPORTS @@ -253,7 +253,7 @@ in6_pcbbind(in6p, nam, p) priv = (p && !suser(p->p_ucred, &p->p_acflag)) ? 1 : 0; /* GROSS */ if (ntohs(lport) < IPV6PORT_RESERVED && !priv) - return(EACCES); + return (EACCES); #endif if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { @@ -274,7 +274,7 @@ in6_pcbbind(in6p, nam, p) t = in6_pcblookup(head, &zeroin6_addr, 0, &sin6->sin6_addr, lport, wild); if (t && (reuseport & t->in6p_socket->so_options) == 0) - return(EADDRINUSE); + return (EADDRINUSE); } } in6p->in6p_laddr = sin6->sin6_addr; @@ -283,13 +283,13 @@ in6_pcbbind(in6p, nam, p) if (lport == 0) { int e; if ((e = in6_pcbsetport(&in6p->in6p_laddr, in6p, p)) != 0) - return(e); + return (e); } else in6p->in6p_lport = lport; in6p->in6p_flowinfo = sin6 ? sin6->sin6_flowinfo : 0; /*XXX*/ - return(0); + return (0); } /* @@ -315,11 +315,11 @@ in6_pcbconnect(in6p, nam) (void)&in6a; /* XXX fool gcc */ if (nam->m_len != sizeof(*sin6)) - return(EINVAL); + return (EINVAL); if (sin6->sin6_family != AF_INET6) - return(EAFNOSUPPORT); + return (EAFNOSUPPORT); if (sin6->sin6_port == 0) - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); /* sanity check for mapped address case */ if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { @@ -359,7 +359,7 @@ in6_pcbconnect(in6p, nam) if (sinp == 0) { if (error == 0) error = EADDRNOTAVAIL; - return(error); + return (error); } bzero(&mapped, sizeof(mapped)); mapped.s6_addr16[5] = htons(0xffff); @@ -382,7 +382,7 @@ in6_pcbconnect(in6p, nam) if (in6a == 0) { if (error == 0) error = EADDRNOTAVAIL; - return(error); + return (error); } } if (in6p->in6p_route.ro_rt) @@ -397,7 +397,7 @@ in6_pcbconnect(in6p, nam) in6a : &in6p->in6p_laddr, in6p->in6p_lport, 0)) - return(EADDRINUSE); + return (EADDRINUSE); if (IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr) || (IN6_IS_ADDR_V4MAPPED(&in6p->in6p_laddr) && in6p->in6p_laddr.s6_addr32[3] == 0)) @@ -425,7 +425,7 @@ in6_pcbconnect(in6p, nam) if (in6p->in6p_socket->so_type == SOCK_STREAM) ipsec_pcbconn(in6p->in6p_sp); #endif - return(0); + return (0); } void @@ -827,7 +827,7 @@ in6_pcblookup(head, faddr6, fport_arg, laddr6, lport_arg, flags) break; } } - return(match); + return (match); } struct rtentry * diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 1f596bdb2567..1f30cb6c2cb9 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_src.c,v 1.14 2002/08/26 14:25:01 itojun Exp $ */ +/* $NetBSD: in6_src.c,v 1.15 2002/09/11 02:46:45 itojun Exp $ */ /* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.14 2002/08/26 14:25:01 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.15 2002/09/11 02:46:45 itojun Exp $"); #include "opt_inet.h" @@ -132,14 +132,14 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp) */ if (opts && (pi = opts->ip6po_pktinfo) && !IN6_IS_ADDR_UNSPECIFIED(&pi->ipi6_addr)) - return(&pi->ipi6_addr); + return (&pi->ipi6_addr); /* * If the source address is not specified but the socket(if any) * is already bound, use the bound address. */ if (laddr && !IN6_IS_ADDR_UNSPECIFIED(laddr)) - return(laddr); + return (laddr); /* * If the caller doesn't specify the source address but @@ -152,9 +152,9 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp) dst); if (ia6 == 0) { *errorp = EADDRNOTAVAIL; - return(0); + return (0); } - return(&satosin6(&ia6->ia_addr)->sin6_addr); + return (&satosin6(&ia6->ia_addr)->sin6_addr); } /* @@ -175,15 +175,15 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp) if (dstsock->sin6_scope_id < 0 || if_index < dstsock->sin6_scope_id) { *errorp = ENXIO; /* XXX: better error? */ - return(0); + return (0); } ia6 = in6_ifawithscope(ifindex2ifnet[dstsock->sin6_scope_id], dst); if (ia6 == 0) { *errorp = EADDRNOTAVAIL; - return(0); + return (0); } - return(&satosin6(&ia6->ia_addr)->sin6_addr); + return (&satosin6(&ia6->ia_addr)->sin6_addr); } /* @@ -206,9 +206,9 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp) ia6 = in6_ifawithscope(ifp, dst); if (ia6 == 0) { *errorp = EADDRNOTAVAIL; - return(0); + return (0); } - return(&satosin6(&ia6->ia_addr)->sin6_addr); + return (&satosin6(&ia6->ia_addr)->sin6_addr); } } @@ -231,9 +231,9 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp) } if (ia6 == 0) { *errorp = EADDRNOTAVAIL; - return(0); + return (0); } - return(&satosin6(&ia6->ia_addr)->sin6_addr); + return (&satosin6(&ia6->ia_addr)->sin6_addr); } } @@ -296,19 +296,19 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp) if (ia6 == 0) ia6 = ifatoia6(ifa_ifwithnet(sin6tosa(&sin6))); if (ia6 == 0) - return(0); - return(&satosin6(&ia6->ia_addr)->sin6_addr); + return (0); + return (&satosin6(&ia6->ia_addr)->sin6_addr); } #endif /* 0 */ if (ia6 == 0) { *errorp = EHOSTUNREACH; /* no route */ - return(0); + return (0); } - return(&satosin6(&ia6->ia_addr)->sin6_addr); + return (&satosin6(&ia6->ia_addr)->sin6_addr); } *errorp = EADDRNOTAVAIL; - return(0); + return (0); } /* @@ -324,11 +324,11 @@ in6_selecthlim(in6p, ifp) struct ifnet *ifp; { if (in6p && in6p->in6p_hops >= 0) - return(in6p->in6p_hops); + return (in6p->in6p_hops); else if (ifp) - return(ND_IFINFO(ifp)->chlim); + return (ND_IFINFO(ifp)->chlim); else - return(ip6_defhlim); + return (ip6_defhlim); } /* @@ -398,7 +398,7 @@ in6_pcbsetport(laddr, in6p, p) } in6p->in6p_lport = lport; - return(0); /* success */ + return (0); /* success */ } /* diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 1a313bf2ebb8..7dd31d6faf6e 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_mroute.c,v 1.36 2002/07/25 12:41:51 itojun Exp $ */ +/* $NetBSD: ip6_mroute.c,v 1.37 2002/09/11 02:46:45 itojun Exp $ */ /* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */ /* @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.36 2002/07/25 12:41:51 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.37 2002/09/11 02:46:45 itojun Exp $"); #include "opt_inet.h" @@ -285,10 +285,10 @@ mrt6_ioctl(cmd, data) switch (cmd) { case SIOCGETSGCNT_IN6: - return(get_sg_cnt((struct sioc_sg_req6 *)data)); + return (get_sg_cnt((struct sioc_sg_req6 *)data)); break; /* for safety */ case SIOCGETMIFCNT_IN6: - return(get_mif6_cnt((struct sioc_mif_req6 *)data)); + return (get_mif6_cnt((struct sioc_mif_req6 *)data)); break; /* for safety */ default: return (EINVAL); @@ -315,7 +315,7 @@ get_sg_cnt(req) req->bytecnt = rt->mf6c_byte_cnt; req->wrong_if = rt->mf6c_wrong_if; } else - return(ESRCH); + return (ESRCH); #if 0 req->pktcnt = req->bytecnt = req->wrong_if = 0xffffffff; #endif @@ -1611,7 +1611,7 @@ pim6_input(mp, offp, proto) log(LOG_DEBUG,"pim6_input: PIM packet too short\n"); #endif m_freem(m); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } /* @@ -1665,7 +1665,7 @@ pim6_input(mp, offp, proto) "pim6_input: invalid checksum\n"); #endif m_freem(m); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } } #endif /* PIM_CHECKSUM */ @@ -1679,7 +1679,7 @@ pim6_input(mp, offp, proto) pim->pim_ver, PIM_VERSION); #endif m_freem(m); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } if (pim->pim_type == PIM_REGISTER) { @@ -1705,7 +1705,7 @@ pim6_input(mp, offp, proto) reg_mif_num); #endif m_freem(m); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } reghdr = (u_int32_t *)(pim + 1); @@ -1726,7 +1726,7 @@ pim6_input(mp, offp, proto) pimlen, ip6_sprintf(&ip6->ip6_src)); #endif m_freem(m); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } eip6 = (struct ip6_hdr *) (reghdr + 1); @@ -1749,7 +1749,7 @@ pim6_input(mp, offp, proto) (eip6->ip6_vfc & IPV6_VERSION)); #endif m_freem(m); - return(IPPROTO_NONE); + return (IPPROTO_NONE); } /* verify the inner packet is destined to a mcast group */ @@ -1763,7 +1763,7 @@ pim6_input(mp, offp, proto) ip6_sprintf(&eip6->ip6_dst)); #endif m_freem(m); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } /* @@ -1777,7 +1777,7 @@ pim6_input(mp, offp, proto) "could not copy register head\n"); #endif m_freem(m); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } /* @@ -1811,5 +1811,5 @@ pim6_input(mp, offp, proto) */ pim6_input_to_daemon: rip6_input(&m, offp, proto); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index fa47144a8768..eddb66df5dda 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_output.c,v 1.56 2002/09/11 02:41:26 itojun Exp $ */ +/* $NetBSD: ip6_output.c,v 1.57 2002/09/11 02:46:45 itojun Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.56 2002/09/11 02:41:26 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.57 2002/09/11 02:46:45 itojun Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -979,7 +979,7 @@ done: key_freesp(sp); #endif /* IPSEC */ - return(error); + return (error); freehdrs: m_freem(exthdrs.ip6e_hbh); /* m_freem will check if mbuf is 0 */ @@ -1001,17 +1001,17 @@ ip6_copyexthdr(mp, hdr, hlen) struct mbuf *m; if (hlen > MCLBYTES) - return(ENOBUFS); /* XXX */ + return (ENOBUFS); /* XXX */ MGET(m, M_DONTWAIT, MT_DATA); if (!m) - return(ENOBUFS); + return (ENOBUFS); if (hlen > MLEN) { MCLGET(m, M_DONTWAIT); if ((m->m_flags & M_EXT) == 0) { m_free(m); - return(ENOBUFS); + return (ENOBUFS); } } m->m_len = hlen; @@ -1019,7 +1019,7 @@ ip6_copyexthdr(mp, hdr, hlen) bcopy(hdr, mtod(m, caddr_t), hlen); *mp = m; - return(0); + return (0); } /* @@ -1045,7 +1045,7 @@ ip6_insert_jumboopt(exthdrs, plen) if (exthdrs->ip6e_hbh == 0) { MGET(mopt, M_DONTWAIT, MT_DATA); if (mopt == 0) - return(ENOBUFS); + return (ENOBUFS); mopt->m_len = JUMBOOPTLEN; optbuf = mtod(mopt, u_int8_t *); optbuf[1] = 0; /* = ((JUMBOOPTLEN) >> 3) - 1 */ @@ -1069,7 +1069,7 @@ ip6_insert_jumboopt(exthdrs, plen) * not fit even in an mbuf cluster. */ if (oldoptlen + JUMBOOPTLEN > MCLBYTES) - return(ENOBUFS); + return (ENOBUFS); /* * As a consequence, we must always prepare a cluster @@ -1084,7 +1084,7 @@ ip6_insert_jumboopt(exthdrs, plen) } } if (!n) - return(ENOBUFS); + return (ENOBUFS); n->m_len = oldoptlen + JUMBOOPTLEN; bcopy(mtod(mopt, caddr_t), mtod(n, caddr_t), oldoptlen); @@ -1115,7 +1115,7 @@ ip6_insert_jumboopt(exthdrs, plen) /* finally, adjust the packet header length */ exthdrs->ip6e_ip6->m_pkthdr.len += JUMBOOPTLEN; - return(0); + return (0); #undef JUMBOOPTLEN } @@ -1134,7 +1134,7 @@ ip6_insertfraghdr(m0, m, hlen, frghdrp) n = m_copym(m0, sizeof(struct ip6_hdr), hlen - sizeof(struct ip6_hdr), M_DONTWAIT); if (n == 0) - return(ENOBUFS); + return (ENOBUFS); m->m_next = n; } else n = m; @@ -1156,13 +1156,13 @@ ip6_insertfraghdr(m0, m, hlen, frghdrp) MGET(mfrg, M_DONTWAIT, MT_DATA); if (mfrg == 0) - return(ENOBUFS); + return (ENOBUFS); mfrg->m_len = sizeof(struct ip6_frag); *frghdrp = mtod(mfrg, struct ip6_frag *); mlast->m_next = mfrg; } - return(0); + return (0); } static int @@ -1225,7 +1225,7 @@ ip6_getpmtu(ro_pmtu, ro, ifp, dst, mtup) error = EHOSTUNREACH; /* XXX */ *mtup = mtu; - return(error); + return (error); } /* @@ -1250,7 +1250,7 @@ ip6_ctloutput(op, so, level, optname, mp) switch (optname) { case IPV6_PKTOPTIONS: /* m is freed in ip6_pcbopts */ - return(ip6_pcbopts(&in6p->in6p_outputopts, + return (ip6_pcbopts(&in6p->in6p_outputopts, m, so)); case IPV6_HOPOPTS: case IPV6_DSTOPTS: @@ -1547,7 +1547,7 @@ do { \ if (op == PRCO_SETOPT && *mp) (void)m_free(*mp); } - return(error); + return (error); } int @@ -1567,7 +1567,7 @@ ip6_raw_ctloutput(op, so, level, optname, mp) if (level != IPPROTO_IPV6) { if (op == PRCO_SETOPT && *mp) (void)m_free(*mp); - return(EINVAL); + return (EINVAL); } switch (optname) { @@ -1623,7 +1623,7 @@ ip6_raw_ctloutput(op, so, level, optname, mp) if (op == PRCO_SETOPT && m) (void)m_free(m); - return(error); + return (error); } /* @@ -1658,7 +1658,7 @@ ip6_pcbopts(pktopt, m, so) free(opt, M_IP6OPT); if (m) (void)m_free(m); - return(0); + return (0); } /* set options specified by user. */ @@ -1666,10 +1666,10 @@ ip6_pcbopts(pktopt, m, so) priv = 1; if ((error = ip6_setpktoptions(m, opt, priv)) != 0) { (void)m_free(m); - return(error); + return (error); } *pktopt = opt; - return(0); + return (0); } /* @@ -1700,7 +1700,7 @@ ip6_setmoptions(optname, im6op, m) malloc(sizeof(*im6o), M_IPMOPTS, M_WAITOK); if (im6o == NULL) - return(ENOBUFS); + return (ENOBUFS); *im6op = im6o; im6o->im6o_multicast_ifp = NULL; im6o->im6o_multicast_hlim = ip6_defmcasthlim; @@ -1950,7 +1950,7 @@ ip6_setmoptions(optname, im6op, m) *im6op = NULL; } - return(error); + return (error); } /* @@ -1975,7 +1975,7 @@ ip6_getmoptions(optname, im6o, mp) *ifindex = 0; else *ifindex = im6o->im6o_multicast_ifp->if_index; - return(0); + return (0); case IPV6_MULTICAST_HOPS: hlim = mtod(*mp, u_int *); @@ -1984,7 +1984,7 @@ ip6_getmoptions(optname, im6o, mp) *hlim = ip6_defmcasthlim; else *hlim = im6o->im6o_multicast_hlim; - return(0); + return (0); case IPV6_MULTICAST_LOOP: loop = mtod(*mp, u_int *); @@ -1993,10 +1993,10 @@ ip6_getmoptions(optname, im6o, mp) *loop = ip6_defmcasthlim; else *loop = im6o->im6o_multicast_loop; - return(0); + return (0); default: - return(EOPNOTSUPP); + return (EOPNOTSUPP); } } @@ -2031,7 +2031,7 @@ ip6_setpktoptions(control, opt, priv) struct cmsghdr *cm = 0; if (control == 0 || opt == 0) - return(EINVAL); + return (EINVAL); bzero(opt, sizeof(*opt)); opt->ip6po_hlim = -1; /* -1 means to use default hop limit */ @@ -2041,7 +2041,7 @@ ip6_setpktoptions(control, opt, priv) * in a single mbuf. */ if (control->m_next) - return(EINVAL); + return (EINVAL); opt->ip6po_m = control; @@ -2049,14 +2049,14 @@ ip6_setpktoptions(control, opt, priv) control->m_len -= CMSG_ALIGN(cm->cmsg_len)) { cm = mtod(control, struct cmsghdr *); if (cm->cmsg_len == 0 || cm->cmsg_len > control->m_len) - return(EINVAL); + return (EINVAL); if (cm->cmsg_level != IPPROTO_IPV6) continue; switch (cm->cmsg_type) { case IPV6_PKTINFO: if (cm->cmsg_len != CMSG_LEN(sizeof(struct in6_pktinfo))) - return(EINVAL); + return (EINVAL); opt->ip6po_pktinfo = (struct in6_pktinfo *)CMSG_DATA(cm); if (opt->ip6po_pktinfo->ipi6_ifindex && IN6_IS_ADDR_LINKLOCAL(&opt->ip6po_pktinfo->ipi6_addr)) @@ -2065,7 +2065,7 @@ ip6_setpktoptions(control, opt, priv) if (opt->ip6po_pktinfo->ipi6_ifindex > if_index || opt->ip6po_pktinfo->ipi6_ifindex < 0) { - return(ENXIO); + return (ENXIO); } /* @@ -2088,11 +2088,11 @@ ip6_setpktoptions(control, opt, priv) (opt->ip6po_pktinfo->ipi6_ifindex && (ia->ifa_ifp->if_index != opt->ip6po_pktinfo->ipi6_ifindex))) { - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); } ia6 = (struct in6_ifaddr *)ia; if ((ia6->ia6_flags & (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY)) != 0) { - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); } /* @@ -2101,28 +2101,28 @@ ip6_setpktoptions(control, opt, priv) * node. */ if (IN6_IS_ADDR_MULTICAST(&opt->ip6po_pktinfo->ipi6_addr)) - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); } break; case IPV6_HOPLIMIT: if (cm->cmsg_len != CMSG_LEN(sizeof(int))) - return(EINVAL); + return (EINVAL); bcopy(CMSG_DATA(cm), &opt->ip6po_hlim, sizeof(opt->ip6po_hlim)); if (opt->ip6po_hlim < -1 || opt->ip6po_hlim > 255) - return(EINVAL); + return (EINVAL); break; case IPV6_NEXTHOP: if (!priv) - return(EPERM); + return (EPERM); /* check if cmsg_len is large enough for sa_len */ if (cm->cmsg_len < sizeof(u_char) || cm->cmsg_len < CMSG_LEN(*CMSG_DATA(cm))) - return(EINVAL); + return (EINVAL); opt->ip6po_nexthop = (struct sockaddr *)CMSG_DATA(cm); @@ -2130,16 +2130,16 @@ ip6_setpktoptions(control, opt, priv) case IPV6_HOPOPTS: if (cm->cmsg_len < CMSG_LEN(sizeof(struct ip6_hbh))) - return(EINVAL); + return (EINVAL); opt->ip6po_hbh = (struct ip6_hbh *)CMSG_DATA(cm); if (cm->cmsg_len != CMSG_LEN((opt->ip6po_hbh->ip6h_len + 1) << 3)) - return(EINVAL); + return (EINVAL); break; case IPV6_DSTOPTS: if (cm->cmsg_len < CMSG_LEN(sizeof(struct ip6_dest))) - return(EINVAL); + return (EINVAL); /* * If there is no routing header yet, the destination @@ -2152,40 +2152,40 @@ ip6_setpktoptions(control, opt, priv) (struct ip6_dest *)CMSG_DATA(cm); if (cm->cmsg_len != CMSG_LEN((opt->ip6po_dest1->ip6d_len + 1) << 3)); - return(EINVAL); + return (EINVAL); } else { opt->ip6po_dest2 = (struct ip6_dest *)CMSG_DATA(cm); if (cm->cmsg_len != CMSG_LEN((opt->ip6po_dest2->ip6d_len + 1) << 3)) - return(EINVAL); + return (EINVAL); } break; case IPV6_RTHDR: if (cm->cmsg_len < CMSG_LEN(sizeof(struct ip6_rthdr))) - return(EINVAL); + return (EINVAL); opt->ip6po_rthdr = (struct ip6_rthdr *)CMSG_DATA(cm); if (cm->cmsg_len != CMSG_LEN((opt->ip6po_rthdr->ip6r_len + 1) << 3)) - return(EINVAL); + return (EINVAL); switch (opt->ip6po_rthdr->ip6r_type) { case IPV6_RTHDR_TYPE_0: if (opt->ip6po_rthdr->ip6r_segleft == 0) - return(EINVAL); + return (EINVAL); break; default: - return(EINVAL); + return (EINVAL); } break; default: - return(ENOPROTOOPT); + return (ENOPROTOOPT); } } - return(0); + return (0); } /* diff --git a/sys/netinet6/ipsec.c b/sys/netinet6/ipsec.c index 8d304f99a6cb..b5a177918fd4 100644 --- a/sys/netinet6/ipsec.c +++ b/sys/netinet6/ipsec.c @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.66 2002/09/11 02:41:27 itojun Exp $ */ +/* $NetBSD: ipsec.c,v 1.67 2002/09/11 02:46:46 itojun Exp $ */ /* $KAME: ipsec.c,v 1.136 2002/05/19 00:36:39 itojun Exp $ */ /* @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.66 2002/09/11 02:41:27 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.67 2002/09/11 02:46:46 itojun Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -3388,10 +3388,10 @@ ipsec_copypkt(m) mpp = &n->m_next; } - return(m); + return (m); fail: m_freem(m); - return(NULL); + return (NULL); } static struct mbuf * diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 6faae203fa51..502fee23f9f8 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.72 2002/09/04 07:22:28 itojun Exp $ */ +/* $NetBSD: nd6.c,v 1.73 2002/09/11 02:46:46 itojun Exp $ */ /* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.72 2002/09/04 07:22:28 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.73 2002/09/11 02:46:46 itojun Exp $"); #include #include @@ -678,7 +678,7 @@ nd6_lookup(addr6, create, ifp) struct ifaddr *ifa = ifaof_ifpforaddr((struct sockaddr *)&sin6, ifp); if (ifa == NULL) - return(NULL); + return (NULL); /* * Create a new route. RTF_LLINFO is necessary @@ -696,17 +696,17 @@ nd6_lookup(addr6, create, ifp) "neighbor(%s), errno=%d\n", ip6_sprintf(addr6), e); #endif - return(NULL); + return (NULL); } if (rt == NULL) - return(NULL); + return (NULL); if (rt->rt_llinfo) { struct llinfo_nd6 *ln = (struct llinfo_nd6 *)rt->rt_llinfo; ln->ln_state = ND6_LLINFO_NOSTATE; } } else - return(NULL); + return (NULL); } rt->rt_refcnt--; /* @@ -730,9 +730,9 @@ nd6_lookup(addr6, create, ifp) ip6_sprintf(addr6), ifp ? if_name(ifp) : "unspec"); } - return(NULL); + return (NULL); } - return(rt); + return (rt); } /* @@ -755,7 +755,7 @@ nd6_is_addr_neighbor(addr, ifp) */ if (IN6_IS_ADDR_LINKLOCAL(&addr->sin6_addr) && ntohs(*(u_int16_t *)&addr->sin6_addr.s6_addr[2]) == ifp->if_index) - return(1); + return (1); /* * If the address matches one of our on-link prefixes, it should be a @@ -781,7 +781,7 @@ nd6_is_addr_neighbor(addr, ifp) */ if (!ip6_forwarding && TAILQ_FIRST(&nd_defrouter) == NULL && nd6_defifindex == ifp->if_index) { - return(1); + return (1); } /* @@ -789,9 +789,9 @@ nd6_is_addr_neighbor(addr, ifp) * in the neighbor cache. */ if ((rt = nd6_lookup(&addr->sin6_addr, 0, ifp)) != NULL) - return(1); + return (1); - return(0); + return (0); } /* @@ -836,7 +836,7 @@ nd6_free(rt, gc) */ ln->ln_expire = dr->expire; splx(s); - return(ln->ln_next); + return (ln->ln_next); } if (ln->ln_router || dr) { @@ -896,7 +896,7 @@ nd6_free(rt, gc) rtrequest(RTM_DELETE, rt_key(rt), (struct sockaddr *)0, rt_mask(rt), 0, (struct rtentry **)0); - return(next); + return (next); } /* @@ -1415,10 +1415,10 @@ nd6_ioctl(cmd, data, ifp) ndif->ifindex = nd6_defifindex; break; case SIOCSDEFIFACE_IN6: /* XXX: should be implemented as a sysctl? */ - return(nd6_setdefaultiface(ndif->ifindex)); + return (nd6_setdefaultiface(ndif->ifindex)); break; } - return(error); + return (error); } /* @@ -1854,15 +1854,15 @@ nd6_output(ifp, origifp, m0, dst, rt0) ND6_RETRANS_SEC(ND_IFINFO(ifp)->retrans); nd6_ns_output(ifp, NULL, &dst->sin6_addr, ln, 0); } - return(0); + return (0); sendpkt: if ((ifp->if_flags & IFF_LOOPBACK) != 0) { - return((*ifp->if_output)(origifp, m, (struct sockaddr *)dst, + return ((*ifp->if_output)(origifp, m, (struct sockaddr *)dst, rt)); } - return((*ifp->if_output)(ifp, m, (struct sockaddr *)dst, rt)); + return ((*ifp->if_output)(ifp, m, (struct sockaddr *)dst, rt)); bad: if (m) @@ -1888,9 +1888,9 @@ nd6_need_cache(ifp) case IFT_FDDI: case IFT_IEEE1394: case IFT_GIF: /* XXX need more cases? */ - return(1); + return (1); default: - return(0); + return (0); } } @@ -1910,28 +1910,28 @@ nd6_storelladdr(ifp, rt, m, dst, desten) case IFT_FDDI: ETHER_MAP_IPV6_MULTICAST(&SIN6(dst)->sin6_addr, desten); - return(1); + return (1); case IFT_IEEE1394: bcopy(ifp->if_broadcastaddr, desten, ifp->if_addrlen); - return(1); + return (1); case IFT_ARCNET: *desten = 0; - return(1); + return (1); default: m_freem(m); - return(0); + return (0); } } if (rt == NULL) { /* this could happen, if we could not allocate memory */ m_freem(m); - return(0); + return (0); } if (rt->rt_gateway->sa_family != AF_LINK) { printf("nd6_storelladdr: something odd happens\n"); m_freem(m); - return(0); + return (0); } sdl = SDL(rt->rt_gateway); if (sdl->sdl_alen == 0) { @@ -1939,11 +1939,11 @@ nd6_storelladdr(ifp, rt, m, dst, desten) printf("nd6_storelladdr: sdl_alen == 0, dst=%s, if=%s\n", ip6_sprintf(&SIN6(dst)->sin6_addr), if_name(ifp)); m_freem(m); - return(0); + return (0); } bcopy(LLADDR(sdl), desten, sdl->sdl_alen); - return(1); + return (1); } int @@ -1993,7 +1993,7 @@ nd6_sysctl(name, oldp, oldlenp, newp, newlen) if (p) free(p, M_TEMP); - return(error); + return (error); } static int @@ -2044,7 +2044,7 @@ fill_drlist(oldp, oldlenp, ol) splx(s); - return(error); + return (error); } static int @@ -2146,5 +2146,5 @@ fill_prlist(oldp, oldlenp, ol) splx(s); - return(error); + return (error); } diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index e08f57770180..34a911223de1 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_rtr.c,v 1.35 2002/07/30 23:24:21 itojun Exp $ */ +/* $NetBSD: nd6_rtr.c,v 1.36 2002/09/11 02:46:46 itojun Exp $ */ /* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.35 2002/07/30 23:24:21 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.36 2002/09/11 02:46:46 itojun Exp $"); #include #include @@ -593,11 +593,11 @@ defrouter_lookup(addr, ifp) for (dr = TAILQ_FIRST(&nd_defrouter); dr; dr = TAILQ_NEXT(dr, dr_entry)) { if (dr->ifp == ifp && IN6_ARE_ADDR_EQUAL(addr, &dr->rtaddr)) { - return(dr); + return (dr); } } - return(NULL); /* search failed */ + return (NULL); /* search failed */ } void @@ -908,7 +908,7 @@ defrtrlist_update(new) */ if (rtpref(new) == oldpref) { splx(s); - return(dr); + return (dr); } /* @@ -925,19 +925,19 @@ defrtrlist_update(new) goto insert; } splx(s); - return(dr); + return (dr); } /* entry does not exist */ if (new->rtlifetime == 0) { splx(s); - return(NULL); + return (NULL); } n = (struct nd_defrouter *)malloc(sizeof(*n), M_IP6NDP, M_NOWAIT); if (n == NULL) { splx(s); - return(NULL); + return (NULL); } bzero(n, sizeof(*n)); *n = *new; @@ -965,7 +965,7 @@ insert: splx(s); - return(n); + return (n); } static struct nd_pfxrouter * @@ -980,7 +980,7 @@ pfxrtr_lookup(pr, dr) break; } - return(search); + return (search); } static void @@ -1024,7 +1024,7 @@ nd6_prefix_lookup(pr) } } - return(search); + return (search); } int @@ -1403,7 +1403,7 @@ find_pfxlist_reachable_router(pr) break; /* found */ } - return(pfxrtr); + return (pfxrtr); } /* @@ -1581,7 +1581,7 @@ nd6_prefix_onlink(pr) nd6log((LOG_ERR, "nd6_prefix_onlink: %s/%d is already on-link\n", ip6_sprintf(&pr->ndpr_prefix.sin6_addr), pr->ndpr_plen); - return(EEXIST)); + return (EEXIST)); } /* @@ -1601,7 +1601,7 @@ nd6_prefix_onlink(pr) if (opr->ndpr_plen == pr->ndpr_plen && in6_are_prefix_equal(&pr->ndpr_prefix.sin6_addr, &opr->ndpr_prefix.sin6_addr, pr->ndpr_plen)) - return(0); + return (0); } /* @@ -1633,7 +1633,7 @@ nd6_prefix_onlink(pr) " to add route for a prefix(%s/%d) on %s\n", ip6_sprintf(&pr->ndpr_prefix.sin6_addr), pr->ndpr_plen, if_name(ifp))); - return(0); + return (0); } /* @@ -1673,7 +1673,7 @@ nd6_prefix_onlink(pr) if (rt != NULL) rt->rt_refcnt--; - return(error); + return (error); } int @@ -1691,7 +1691,7 @@ nd6_prefix_offlink(pr) nd6log((LOG_ERR, "nd6_prefix_offlink: %s/%d is already off-link\n", ip6_sprintf(&pr->ndpr_prefix.sin6_addr), pr->ndpr_plen)); - return(EEXIST); + return (EEXIST); } bzero(&sa6, sizeof(sa6)); @@ -1766,7 +1766,7 @@ nd6_prefix_offlink(pr) } } - return(error); + return (error); } static struct in6_ifaddr * @@ -1878,12 +1878,12 @@ in6_ifadd(pr) "in6_ifadd: failed to make ifaddr %s on %s (errno=%d)\n", ip6_sprintf(&ifra.ifra_addr.sin6_addr), if_name(ifp), error)); - return(NULL); /* ifaddr must not have been allocated. */ + return (NULL); /* ifaddr must not have been allocated. */ } ia = in6ifa_ifpwithaddr(ifp, &ifra.ifra_addr.sin6_addr); - return(ia); /* this is always non-NULL */ + return (ia); /* this is always non-NULL */ } int @@ -1968,10 +1968,10 @@ rt6_deleteroute(rn, arg) struct in6_addr *gate = (struct in6_addr *)arg; if (rt->rt_gateway == NULL || rt->rt_gateway->sa_family != AF_INET6) - return(0); + return (0); if (!IN6_ARE_ADDR_EQUAL(gate, &SIN6(rt->rt_gateway)->sin6_addr)) - return(0); + return (0); /* * Do not delete a static route. @@ -1979,7 +1979,7 @@ rt6_deleteroute(rn, arg) * 'cloned' bit instead? */ if ((rt->rt_flags & RTF_STATIC) != 0) - return(0); + return (0); /* * Do not delete a static route. @@ -1987,16 +1987,16 @@ rt6_deleteroute(rn, arg) * 'cloned' bit instead? */ if ((rt->rt_flags & RTF_STATIC) != 0) - return(0); + return (0); /* * We delete only host route. This means, in particular, we don't * delete default route. */ if ((rt->rt_flags & RTF_HOST) == 0) - return(0); + return (0); - return(rtrequest(RTM_DELETE, rt_key(rt), rt->rt_gateway, + return (rtrequest(RTM_DELETE, rt_key(rt), rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0)); #undef SIN6 } @@ -2008,7 +2008,7 @@ nd6_setdefaultiface(ifindex) int error = 0; if (ifindex < 0 || if_index < ifindex) - return(EINVAL); + return (EINVAL); if (nd6_defifindex != ifindex) { nd6_defifindex = ifindex; @@ -2023,5 +2023,5 @@ nd6_setdefaultiface(ifindex) defrouter_select(); } - return(error); + return (error); } diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index f81391c5e113..f823eaefbd49 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip6.c,v 1.50 2002/09/11 02:41:28 itojun Exp $ */ +/* $NetBSD: raw_ip6.c,v 1.51 2002/09/11 02:46:47 itojun Exp $ */ /* $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.50 2002/09/11 02:41:28 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.51 2002/09/11 02:46:47 itojun Exp $"); #include "opt_ipsec.h" @@ -534,7 +534,7 @@ rip6_output(m, va_alist) RTFREE(optp->ip6po_route.ro_rt); if (control) m_freem(control); - return(error); + return (error); } /* @@ -836,7 +836,7 @@ rip6_usrreq(so, req, m, nam, control, p) /* * stat: don't bother with a blocksize */ - return(0); + return (0); /* * Not supported. */ @@ -861,5 +861,5 @@ rip6_usrreq(so, req, m, nam, control, p) } if (m != NULL) m_freem(m); - return(error); + return (error); } diff --git a/sys/netinet6/route6.c b/sys/netinet6/route6.c index 40e6f32219e4..8e16d5845fe8 100644 --- a/sys/netinet6/route6.c +++ b/sys/netinet6/route6.c @@ -1,4 +1,4 @@ -/* $NetBSD: route6.c,v 1.10 2001/11/13 00:57:06 lukem Exp $ */ +/* $NetBSD: route6.c,v 1.11 2002/09/11 02:46:47 itojun Exp $ */ /* $KAME: route6.c,v 1.22 2000/12/03 00:54:00 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: route6.c,v 1.10 2001/11/13 00:57:06 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: route6.c,v 1.11 2002/09/11 02:46:47 itojun Exp $"); #include #include @@ -100,7 +100,7 @@ route6_input(mp, offp, proto) } #endif if (ip6_rthdr0(m, ip6, (struct ip6_rthdr0 *)rh)) - return(IPPROTO_DONE); + return (IPPROTO_DONE); break; default: /* unknown routing type */ @@ -111,11 +111,11 @@ route6_input(mp, offp, proto) ip6stat.ip6s_badoptions++; icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, (caddr_t)&rh->ip6r_type - (caddr_t)ip6); - return(IPPROTO_DONE); + return (IPPROTO_DONE); } *offp += rhlen; - return(rh->ip6r_nxt); + return (rh->ip6r_nxt); } /* @@ -131,7 +131,7 @@ ip6_rthdr0(m, ip6, rh0) struct in6_addr *nextaddr, tmpaddr; if (rh0->ip6r0_segleft == 0) - return(0); + return (0); if (rh0->ip6r0_len % 2 #ifdef COMPAT_RFC1883 @@ -146,14 +146,14 @@ ip6_rthdr0(m, ip6, rh0) ip6stat.ip6s_badoptions++; icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, (caddr_t)&rh0->ip6r0_len - (caddr_t)ip6); - return(-1); + return (-1); } if ((addrs = rh0->ip6r0_len / 2) < rh0->ip6r0_segleft) { ip6stat.ip6s_badoptions++; icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, (caddr_t)&rh0->ip6r0_segleft - (caddr_t)ip6); - return(-1); + return (-1); } index = addrs - rh0->ip6r0_segleft; @@ -171,7 +171,7 @@ ip6_rthdr0(m, ip6, rh0) IN6_IS_ADDR_V4COMPAT(nextaddr)) { ip6stat.ip6s_badoptions++; m_freem(m); - return(-1); + return (-1); } if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst) || @@ -179,7 +179,7 @@ ip6_rthdr0(m, ip6, rh0) IN6_IS_ADDR_V4COMPAT(&ip6->ip6_dst)) { ip6stat.ip6s_badoptions++; m_freem(m); - return(-1); + return (-1); } /* @@ -202,5 +202,5 @@ ip6_rthdr0(m, ip6, rh0) ip6_forward(m, 1); #endif - return(-1); /* m would be freed in ip6_forward() */ + return (-1); /* m would be freed in ip6_forward() */ } diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c index d2b5e05381c5..d90a592b1bc4 100644 --- a/sys/netinet6/udp6_output.c +++ b/sys/netinet6/udp6_output.c @@ -1,4 +1,4 @@ -/* $NetBSD: udp6_output.c,v 1.9 2002/08/26 14:25:01 itojun Exp $ */ +/* $NetBSD: udp6_output.c,v 1.10 2002/09/11 02:46:47 itojun Exp $ */ /* $KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp6_output.c,v 1.9 2002/08/26 14:25:01 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp6_output.c,v 1.10 2002/09/11 02:46:47 itojun Exp $"); #include "opt_ipsec.h" #include "opt_inet.h" @@ -407,5 +407,5 @@ releaseopt: in6p->in6p_outputopts = stickyopt; m_freem(control); } - return(error); + return (error); } diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 29ac32ec552a..c2dc447c3304 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1,4 +1,4 @@ -/* $NetBSD: udp6_usrreq.c,v 1.52 2002/05/12 20:33:51 matt Exp $ */ +/* $NetBSD: udp6_usrreq.c,v 1.53 2002/09/11 02:46:47 itojun Exp $ */ /* $KAME: udp6_usrreq.c,v 1.86 2001/05/27 17:33:00 itojun Exp $ */ /* @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.52 2002/05/12 20:33:51 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.53 2002/09/11 02:46:47 itojun Exp $"); #include "opt_ipsec.h" @@ -288,7 +288,7 @@ udp6_usrreq(so, req, m, addr6, control, p) * and AF_INET6 socket for AF_INET6 addrs. */ if (req == PRU_CONTROL) - return(in6_control(so, (u_long)m, (caddr_t)addr6, + return (in6_control(so, (u_long)m, (caddr_t)addr6, (struct ifnet *)control, p)); if (req == PRU_PURGEIF) { @@ -382,7 +382,7 @@ udp6_usrreq(so, req, m, addr6, control, p) break; case PRU_SEND: - return(udp6_output(in6p, m, addr6, control, p)); + return (udp6_output(in6p, m, addr6, control, p)); case PRU_ABORT: soisdisconnected(so); @@ -401,7 +401,7 @@ udp6_usrreq(so, req, m, addr6, control, p) /* * stat: don't bother with a blocksize */ - return(0); + return (0); case PRU_SENDOOB: case PRU_FASTTIMO: @@ -413,7 +413,7 @@ udp6_usrreq(so, req, m, addr6, control, p) case PRU_RCVD: case PRU_RCVOOB: - return(EOPNOTSUPP); /* do not free mbuf's */ + return (EOPNOTSUPP); /* do not free mbuf's */ default: panic("udp6_usrreq"); @@ -424,7 +424,7 @@ release: m_freem(control); if (m) m_freem(m); - return(error); + return (error); } static void diff --git a/sys/netkey/key.c b/sys/netkey/key.c index 4c1bf26e81e5..617d0cc83095 100644 --- a/sys/netkey/key.c +++ b/sys/netkey/key.c @@ -1,4 +1,4 @@ -/* $NetBSD: key.c,v 1.74 2002/08/20 08:17:02 itojun Exp $ */ +/* $NetBSD: key.c,v 1.75 2002/09/11 02:46:47 itojun Exp $ */ /* $KAME: key.c,v 1.249 2002/06/14 14:46:22 itojun Exp $ */ /* @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.74 2002/08/20 08:17:02 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.75 2002/09/11 02:46:47 itojun Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -2278,7 +2278,7 @@ key_newsah(saidx) newsah->state = SADB_SASTATE_MATURE; LIST_INSERT_HEAD(&sahtree, newsah, chain); - return(newsah); + return (newsah); } /* @@ -2514,7 +2514,7 @@ key_getsah(saidx) if (sah->state == SADB_SASTATE_DEAD) continue; if (key_cmpsaidx_exactly(&sah->saidx, saidx)) - return(sah); + return (sah); } return NULL; @@ -2923,7 +2923,7 @@ key_mature(sav) if (sav->alg_enc != SADB_EALG_NONE) { ipseclog((LOG_DEBUG, "key_mature: " "protocol and algorithm mismated.\n")); - return(EINVAL); + return (EINVAL); } checkmask = 2; mustmask = 2; @@ -2932,12 +2932,12 @@ key_mature(sav) if (sav->alg_auth != SADB_AALG_NONE) { ipseclog((LOG_DEBUG, "key_mature: " "protocol and algorithm mismated.\n")); - return(EINVAL); + return (EINVAL); } if ((sav->flags & SADB_X_EXT_RAWCPI) == 0 && ntohl(sav->spi) >= 0x10000) { ipseclog((LOG_DEBUG, "key_mature: invalid cpi for IPComp.\n")); - return(EINVAL); + return (EINVAL); } checkmask = 4; mustmask = 4; diff --git a/sys/netkey/keysock.c b/sys/netkey/keysock.c index 490070dbe081..eb5861430dc9 100644 --- a/sys/netkey/keysock.c +++ b/sys/netkey/keysock.c @@ -1,4 +1,4 @@ -/* $NetBSD: keysock.c,v 1.18 2002/03/21 04:41:03 itojun Exp $ */ +/* $NetBSD: keysock.c,v 1.19 2002/09/11 02:46:48 itojun Exp $ */ /* $KAME: keysock.c,v 1.23 2000/09/22 08:26:33 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.18 2002/03/21 04:41:03 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.19 2002/09/11 02:46:48 itojun Exp $"); #include "opt_inet.h" @@ -108,7 +108,7 @@ key_usrreq(so, req, m, nam, control, p) free((caddr_t)kp, M_PCB); so->so_pcb = (caddr_t) 0; splx(s); - return(error); + return (error); } kp->kp_promisc = kp->kp_registered = 0; @@ -122,7 +122,7 @@ key_usrreq(so, req, m, nam, control, p) so->so_options |= SO_USELOOPBACK; } splx(s); - return(error); + return (error); } /*