summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2004-06-14 08:26:50 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2004-06-14 08:26:50 +0000
commit3c3a93ac7765dde3e397739f03b36a735ee304e0 (patch)
treedcf31cb8c46e02cb0e898ccb7a2ab071a42a55f0 /sys/netinet
parent3619135ef552c72d767a106faf00b4587deb93e4 (diff)
Calculate optp (pointer to beginning of TCP options) based on th, not
mtod(m), since the previous IP6_EXTHDR_GET() only guarantees this part to be continuous. Report from Andreas Bartelt. ok markus@, itojun@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 0be4cb792c6..c7e594f3dfc 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.172 2004/06/08 19:47:24 markus Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.173 2004/06/14 08:26:49 dhartmei Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -561,7 +561,7 @@ tcp_input(struct mbuf *m, ...)
return;
}
optlen = off - sizeof(struct tcphdr);
- optp = mtod(m, u_int8_t *) + iphlen + sizeof(struct tcphdr);
+ optp = (u_int8_t *)(th + 1);
/*
* Do quick retrieval of timestamp options ("options
* prediction?"). If timestamp is the only option and it's