diff options
| author | itojun <itojun@NetBSD.org> | 2001-10-16 04:57:38 +0000 |
|---|---|---|
| committer | itojun <itojun@NetBSD.org> | 2001-10-16 04:57:38 +0000 |
| commit | 45c8a6a57ee9ee97ae95a797b4d147c9aaecf39b (patch) | |
| tree | 17baa7c05d0e2ae40e08621d0b37e997464a1d9a | |
| parent | 1f7386b8aaeb5ea8005bbf840511c9735534c957 (diff) | |
remove unused #define. sync whitespace/comment with kame.
| -rw-r--r-- | sys/netinet6/in6_ifattach.h | 8 | ||||
| -rw-r--r-- | sys/netinet6/in6_pcb.c | 25 | ||||
| -rw-r--r-- | sys/netinet6/in6_proto.c | 3 |
3 files changed, 16 insertions, 20 deletions
diff --git a/sys/netinet6/in6_ifattach.h b/sys/netinet6/in6_ifattach.h index 2b3fc12555e..307dbfdebcf 100644 --- a/sys/netinet6/in6_ifattach.h +++ b/sys/netinet6/in6_ifattach.h @@ -1,4 +1,4 @@ -/* $NetBSD: in6_ifattach.h,v 1.6 2000/04/12 10:36:44 itojun Exp $ */ +/* $NetBSD: in6_ifattach.h,v 1.7 2001/10/16 04:57:38 itojun Exp $ */ /* $KAME: in6_ifattach.h,v 1.8 2000/04/12 03:51:30 itojun Exp $ */ /* @@ -38,10 +38,4 @@ void in6_ifattach __P((struct ifnet *, struct ifnet *)); void in6_ifdetach __P((struct ifnet *)); #endif /* _KERNEL */ -#define IN6_IFT_LOOP 1 -#define IN6_IFT_P2P 2 -#define IN6_IFT_802 3 -#define IN6_IFT_P2P802 4 -#define IN6_IFT_ARCNET 5 - #endif /* _NETINET6_IN6_IFATTACH_H_ */ diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 8d07a0f3def..91f0941d610 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_pcb.c,v 1.41 2001/10/15 09:51:16 itojun Exp $ */ +/* $NetBSD: in6_pcb.c,v 1.42 2001/10/16 04:57:38 itojun Exp $ */ /* $KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $ */ /* @@ -174,8 +174,9 @@ in6_pcbbind(in6p, nam, p) /* * since we do not check port number duplicate with IPv4 space, - * we reject it at this moment. If we leave it, we make normal - * user to hijack port number from other users. + * we reject it at this moment. If we leave it, we would + * mistakenly allow normal users to hijack tcp/udp ports from + * other users. */ if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) return(EADDRNOTAVAIL); @@ -253,7 +254,8 @@ in6_pcbbind(in6p, nam, p) if (t && (reuseport & t->inp_socket->so_options) == 0) return EADDRINUSE; #endif - } else { + } else + { struct in6pcb *t; t = in6_pcblookup(head, &zeroin6_addr, 0, @@ -599,7 +601,7 @@ in6_pcbnotify(head, dst, fport_arg, src, lport_arg, cmd, cmdarg, notify) /* * Detect if we should notify the error. If no source and - * destination ports are specifed, but non-zero flowinfo and + * destination ports are specified, but non-zero flowinfo and * local address match, notify the error. This is the case * when the error is delivered with an encrypted buffer * by ESP. Otherwise, just compare addresses and ports @@ -703,16 +705,17 @@ in6_losing(in6p) info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; info.rti_info[RTAX_NETMASK] = rt_mask(rt); rt_missmsg(RTM_LOSING, &info, rt->rt_flags, 0); - if (rt->rt_flags & RTF_DYNAMIC) + if (rt->rt_flags & RTF_DYNAMIC) { (void)rtrequest(RTM_DELETE, rt_key(rt), rt->rt_gateway, rt_mask(rt), rt->rt_flags, (struct rtentry **)0); - else - /* - * A new route can be allocated - * the next time output is attempted. - */ + } else { + /* + * A new route can be allocated + * the next time output is attempted. + */ rtfree(rt); + } } } diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index e6987ed21db..3a6f7d843d6 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_proto.c,v 1.30 2001/10/15 09:51:17 itojun Exp $ */ +/* $NetBSD: in6_proto.c,v 1.31 2001/10/16 04:57:38 itojun Exp $ */ /* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */ /* @@ -107,7 +107,6 @@ #include <netinet6/nd6.h> - #ifdef IPSEC #include <netinet6/ipsec.h> #include <netinet6/ah.h> |
