From f491274582d7c358c9288bea8a4c6f7e6212b3e1 Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Mon, 17 Dec 2012 20:55:33 +0000 Subject: [PATCH] Since we use different flags to detect tcp forwarding, and we share the same code for IPv4 and IPv6 in tcp_input, we should check both M_IP_NEXTHOP and M_IP6_NEXTHOP flags. MFC after: 3 days --- sys/netinet/tcp_input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 65a2ed5bc1f..d53fd4b512c 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -780,7 +780,8 @@ tcp_input(struct mbuf *m, int off0) /* * Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain. */ - if (m->m_flags & M_IP_NEXTHOP) + if ((isipv6 && (m->m_flags & M_IP6_NEXTHOP)) || + (!isipv6 && (m->m_flags & M_IP_NEXTHOP))) fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); #ifdef INET6