summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2002-02-04 17:37:06 +0000
committerume <ume@FreeBSD.org>2002-02-04 17:37:06 +0000
commit0c5d24bcd2f85c2d8b80456f157c23ee756ab444 (patch)
treec5357d851cbfa39303bb474325a7460facc15008 /sys
parentfab036615225a2d7a5e54db309c46d0d34c8bf3c (diff)
downloadFreeBSD-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')
-rw-r--r--sys/netinet/tcp_subr.c3
-rw-r--r--sys/netinet/tcp_timewait.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 27d54eb..d79b816 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.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);
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);
OpenPOWER on IntegriCloud