diff options
author | 2004-06-14 08:26:49 +0000 | |
---|---|---|
committer | 2004-06-14 08:26:49 +0000 | |
commit | 430133eb7b057ff6a7c50bbc51bd13300b2bcc09 (patch) | |
tree | 5b6bf0413297d456576ed89849f19e9f6eb4ef3d | |
parent | spelling (diff) | |
download | wireguard-openbsd-430133eb7b057ff6a7c50bbc51bd13300b2bcc09.tar.xz wireguard-openbsd-430133eb7b057ff6a7c50bbc51bd13300b2bcc09.zip |
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@
-rw-r--r-- | sys/netinet/tcp_input.c | 4 |
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 |