diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-07-05 22:51:11 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-07-05 22:51:11 +0000 |
commit | 115a196a388cfb8c17ec6acb07d0a231f5e4269b (patch) | |
tree | 9a904d4cc4771d5acc22d55e1f23b8f36eb0e464 /sys/netinet/tcp_subr.c | |
parent | d52022692cd6e495778e1992a1e586f0c2804c45 (diff) |
more cleanup for IPv4 mapped address support. there seem to be some
inconsistency in corner cases (from NRL I believe).
todd (fries) and I have seen panic, with the following call chain:
ip6_input -> tcp_input -> tcp_respond -> ip_input -> bang!
more cleanups should be done, to decrease complexity.
for example, INP_IPV6_MAPPED should be nuked.
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 15d34f607bf..5096c5f7539 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.27 2000/06/26 22:45:09 art Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.28 2000/07/05 22:51:10 itojun Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -446,15 +446,11 @@ tcp_newtcpcb(inp) tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT; tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT; #ifdef INET6 - /* - * If we want to use tp->pf for a quick-n-easy way to determine - * the outbound dgram type, we cannot make this decision - * until a connection is established! Bzero() sets pf to zero, and - * that's the way we want it, unless, of course, it's an AF_INET - * socket... - */ + /* we disallow IPv4 mapped address completely. */ if ((inp->inp_flags & INP_IPV6) == 0) - tp->pf = PF_INET; /* If AF_INET socket, we can't do v6 from it. */ + tp->pf = PF_INET; + else + tp->pf = PF_INET6; #else tp->pf = PF_INET; #endif |