From owner-svn-src-stable-9@FreeBSD.ORG Thu Dec 20 11:10:24 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CDC1F47; Thu, 20 Dec 2012 11:10:24 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CB0628FC0C; Thu, 20 Dec 2012 11:10:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBKBANLr033293; Thu, 20 Dec 2012 11:10:23 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBKBAN0S033290; Thu, 20 Dec 2012 11:10:23 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201212201110.qBKBAN0S033290@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 20 Dec 2012 11:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244483 - in stable/9/sys: netinet netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 11:10:24 -0000 Author: ae Date: Thu Dec 20 11:10:23 2012 New Revision: 244483 URL: http://svnweb.freebsd.org/changeset/base/244483 Log: MFC r244360: Use M_PROTO7 flag for M_IP6_NEXTHOP, because M_PROTO2 was used for M_AUTHIPHDR. MFC r244365: 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 r244386 (by glebius): Clear correct flag in INET6 case. MFC r244387 (by glebius): Fix !INET6 build after r244365. Modified: stable/9/sys/netinet/tcp_input.c stable/9/sys/netinet6/ip6_var.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/tcp_input.c ============================================================================== --- stable/9/sys/netinet/tcp_input.c Thu Dec 20 05:02:12 2012 (r244482) +++ stable/9/sys/netinet/tcp_input.c Thu Dec 20 11:10:23 2012 (r244483) @@ -792,7 +792,17 @@ findpcb: /* * Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain. */ - if (m->m_flags & M_IP_NEXTHOP) + if ( +#ifdef INET6 + (isipv6 && (m->m_flags & M_IP6_NEXTHOP)) +#ifdef INET + || (!isipv6 && (m->m_flags & M_IP_NEXTHOP)) +#endif +#endif +#if defined(INET) && !defined(INET6) + (m->m_flags & M_IP_NEXTHOP) +#endif + ) fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); #ifdef INET6 @@ -821,7 +831,7 @@ findpcb: } /* Remove the tag from the packet. We don't need it anymore. */ m_tag_delete(m, fwd_tag); - m->m_flags &= ~M_IP_NEXTHOP; + m->m_flags &= ~M_IP6_NEXTHOP; fwd_tag = NULL; } else if (isipv6) { inp = in6_pcblookup_mbuf(&V_tcbinfo, &ip6->ip6_src, Modified: stable/9/sys/netinet6/ip6_var.h ============================================================================== --- stable/9/sys/netinet6/ip6_var.h Thu Dec 20 05:02:12 2012 (r244482) +++ stable/9/sys/netinet6/ip6_var.h Thu Dec 20 11:10:23 2012 (r244483) @@ -285,7 +285,7 @@ struct ip6aux { #define IPV6_FORWARDING 0x02 /* most of IPv6 header exists */ #define IPV6_MINMTU 0x04 /* use minimum MTU (IPV6_USE_MIN_MTU) */ -#define M_IP6_NEXTHOP M_PROTO2 /* explicit ip nexthop */ +#define M_IP6_NEXTHOP M_PROTO7 /* explicit ip nexthop */ #ifdef __NO_STRICT_ALIGNMENT #define IP6_HDR_ALIGNED_P(ip) 1