diff options
author | ume <ume@FreeBSD.org> | 2002-02-04 17:37:06 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2002-02-04 17:37:06 +0000 |
commit | 0c5d24bcd2f85c2d8b80456f157c23ee756ab444 (patch) | |
tree | c5357d851cbfa39303bb474325a7460facc15008 /sys/netinet/tcp_timewait.c | |
parent | fab036615225a2d7a5e54db309c46d0d34c8bf3c (diff) | |
download | FreeBSD-src-0c5d24bcd2f85c2d8b80456f157c23ee756ab444.zip FreeBSD-src-0c5d24bcd2f85c2d8b80456f157c23ee756ab444.tar.gz |
In tcp_respond(), correctly reset returned IPv6 header. This is essential
when the original packet contains an IPv6 extension header.
Obtained from: KAME
MFC after: 1 week
Diffstat (limited to 'sys/netinet/tcp_timewait.c')
-rw-r--r-- | sys/netinet/tcp_timewait.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 27d54eb..d79b816 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -427,6 +427,9 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags) } #ifdef INET6 if (isipv6) { + ip6->ip6_flow = 0; + ip6->ip6_vfc = IPV6_VERSION; + ip6->ip6_nxt = IPPROTO_TCP; ip6->ip6_plen = htons((u_short)(sizeof (struct tcphdr) + tlen)); tlen += sizeof (struct ip6_hdr) + sizeof (struct tcphdr); |