From 115a196a388cfb8c17ec6acb07d0a231f5e4269b Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Wed, 5 Jul 2000 22:51:11 +0000 Subject: 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. --- sys/netinet/tcp_subr.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sys/netinet/tcp_subr.c') 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 -- cgit v1.2.3