summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2007-03-17 06:40:09 +0000
committerkmacy <kmacy@FreeBSD.org>2007-03-17 06:40:09 +0000
commitcda4ca63d432e2d817f6749d250d1151784d49c4 (patch)
treeabc3296aa05022715f541f0311772ff83429ca2a /sys/netinet/tcp_syncache.c
parentab0a579df3ad0d678101197aa3fcae7a0ffcec0e (diff)
downloadFreeBSD-src-cda4ca63d432e2d817f6749d250d1151784d49c4.zip
FreeBSD-src-cda4ca63d432e2d817f6749d250d1151784d49c4.tar.gz
Fix the most obvious of the bugs introduced by recent syncache changes
- *ip is not initialized in the case of inet6 connection, but ip->ip_len is being changed anyway Now the question is, why does it think an ipv4 connection is an ipv6 connection? xemacs still doesn't work over X11 forwarding, but the kernel no longer panics.
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 931383c..a8b1bac 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -1225,8 +1225,11 @@ syncache_respond(struct syncache *sc, struct mbuf *m)
#ifdef INET6
if (sc->sc_inc.inc_isipv6)
ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) + optlen);
+ else
#endif
+ {
ip->ip_len += optlen;
+ }
} else
optlen = 0;
OpenPOWER on IntegriCloud