diff options
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_pcb.c | 50 | ||||
-rw-r--r-- | sys/netinet6/ip6_input.c | 13 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 84 |
3 files changed, 7 insertions, 140 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 47074f216da..7cfbd556cfe 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_pcb.c,v 1.26 2001/06/05 02:31:37 deraadt Exp $ */ +/* $OpenBSD: in6_pcb.c,v 1.27 2002/01/21 05:33:14 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -257,36 +257,8 @@ in6_pcbbind(inp, nam) (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|IN6_IFF_DETACHED)) return(EADDRNOTAVAIL); } -#if 0 /* we don't support it */ - else if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { - struct sockaddr_in sin; - - bzero(&sin, sizeof(sin)); - sin.sin_port = 0; - sin.sin_len = sizeof(sin); - sin.sin_family = AF_INET; - sin.sin_addr.s_addr = sin6->sin6_addr.s6_addr32[3]; - - /* - * Yechhhh, because of upcoming call to - * ifa_ifwithaddr(), which does bcmp's - * over the PORTS as well. (What about flow?) - */ - sin6->sin6_port = 0; - sin6->sin6_flowinfo = 0; - if (ifa_ifwithaddr((struct sockaddr *)sin6) == 0) { - if (!IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr) || - ifa_ifwithaddr((struct sockaddr *)&sin) == 0) { - return EADDRNOTAVAIL; - } - } - } -#endif if (lport) { struct inpcb *t; -#if 0 /* we don't support IPv4 mapped address */ - struct in_addr fa,la; -#endif /* * Question: Do we wish to continue the Berkeley @@ -301,22 +273,10 @@ in6_pcbbind(inp, nam) (error = suser(p->p_ucred, &p->p_acflag))) return error; -#if 0 /* we don't support IPv4 mapped address */ - if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { - fa.s_addr = 0; - la.s_addr = sin6->sin6_addr.s6_addr32[3]; - wild &= ~INPLOOKUP_IPV6; - - t = in_pcblookup(head, (struct in_addr *)&fa, 0, - (struct in_addr *)&la, lport, wild); - } else -#endif - { - t = in_pcblookup(head, - (struct in_addr *)&zeroin6_addr, 0, - (struct in_addr *)&sin6->sin6_addr, lport, - wild); - } + t = in_pcblookup(head, + (struct in_addr *)&zeroin6_addr, 0, + (struct in_addr *)&sin6->sin6_addr, lport, + wild); if (t && (reuseport & t->inp_socket->so_options) == 0) return EADDRINUSE; diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 801aaeba162..19f14b53fc5 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.39 2002/01/02 22:47:47 deraadt Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.40 2002/01/21 05:33:14 itojun Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -220,17 +220,6 @@ ip6_input(m) int nxt, ours = 0; struct ifnet *deliverifp = NULL; -#if 0 /* IPSEC */ - /* - * should the inner packet be considered authentic? - * see comment in ah4_input(). - */ - if (m) { - m->m_flags &= ~M_AUTHIPHDR; - m->m_flags &= ~M_AUTHIPDGM; - } -#endif - /* * mbuf statistics by kazu */ diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index a09717733af..d2c720a80a6 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.56 2001/12/07 09:16:07 itojun Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.57 2002/01/21 05:33:14 itojun Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -398,61 +398,6 @@ ip6_output(m0, opt, ro, flags, im6o, ifpp) nexthdrp, IPPROTO_DSTOPTS); MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, IPPROTO_ROUTING); - -#if 0 /*KAME IPSEC*/ - if (!needipsec) - goto skip_ipsec2; - - /* - * pointers after IPsec headers are not valid any more. - * other pointers need a great care too. - * (IPsec routines should not mangle mbufs prior to AH/ESP) - */ - exthdrs.ip6e_dest2 = NULL; - - { - struct ip6_rthdr *rh = NULL; - int segleft_org = 0; - struct ipsec_output_state state; - - if (exthdrs.ip6e_rthdr) { - rh = mtod(exthdrs.ip6e_rthdr, struct ip6_rthdr *); - segleft_org = rh->ip6r_segleft; - rh->ip6r_segleft = 0; - } - - bzero(&state, sizeof(state)); - state.m = m; - error = ipsec6_output_trans(&state, nexthdrp, mprev, sp, flags, - &needipsectun); - m = state.m; - if (error) { - /* mbuf is already reclaimed in ipsec6_output_trans. */ - m = NULL; - switch (error) { - case EHOSTUNREACH: - case ENETUNREACH: - case EMSGSIZE: - case ENOBUFS: - case ENOMEM: - break; - default: - printf("ip6_output (ipsec): error code %d\n", error); - /*fall through*/ - case ENOENT: - /* don't show these error codes to the user */ - error = 0; - break; - } - goto bad; - } - if (exthdrs.ip6e_rthdr) { - /* ah6_output doesn't modify mbuf chain */ - rh->ip6r_segleft = segleft_org; - } - } -skip_ipsec2:; -#endif } /* @@ -1381,18 +1326,6 @@ ip6_ctloutput(op, so, level, optname, mp) # undef in6p_flags break; -#if 0 /*KAME IPSEC*/ - case IPV6_IPSEC_POLICY: - { - caddr_t req = NULL; - if (m != 0) - req = mtod(m, caddr_t); - error = ipsec6_set_policy(in6p, optname, req, - privileged); - } - break; -#endif /* IPSEC */ - case IPSEC6_OUTSA: #ifndef IPSEC error = EINVAL; @@ -1605,21 +1538,6 @@ ip6_ctloutput(op, so, level, optname, mp) error = ip6_getmoptions(optname, inp->inp_moptions6, mp); break; -#if 0 /*KAME IPSEC*/ - case IPV6_IPSEC_POLICY: - { - caddr_t req = NULL; - int len = 0; - - if (m != 0) { - req = mtod(m, caddr_t); - len = m->m_len; - } - error = ipsec6_get_policy(in6p, req, mp); - break; - } -#endif /* IPSEC */ - case IPSEC6_OUTSA: #ifndef IPSEC error = EINVAL; |