[Midnightbsd-cvs] src [8524] trunk/sys: handle ipv6 next hop since it is both protocols.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Sep 19 09:34:31 EDT 2016
Revision: 8524
http://svnweb.midnightbsd.org/src/?rev=8524
Author: laffer1
Date: 2016-09-19 09:34:31 -0400 (Mon, 19 Sep 2016)
Log Message:
-----------
handle ipv6 next hop since it is both protocols.
Modified Paths:
--------------
trunk/sys/netinet/tcp_input.c
trunk/sys/netinet6/ip6_var.h
Modified: trunk/sys/netinet/tcp_input.c
===================================================================
--- trunk/sys/netinet/tcp_input.c 2016-09-18 23:02:13 UTC (rev 8523)
+++ trunk/sys/netinet/tcp_input.c 2016-09-19 13:34:31 UTC (rev 8524)
@@ -798,7 +798,17 @@
/*
* 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
@@ -827,7 +837,8 @@
}
/* 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,
th->th_sport, &ip6->ip6_dst, th->th_dport,
Modified: trunk/sys/netinet6/ip6_var.h
===================================================================
--- trunk/sys/netinet6/ip6_var.h 2016-09-18 23:02:13 UTC (rev 8523)
+++ trunk/sys/netinet6/ip6_var.h 2016-09-19 13:34:31 UTC (rev 8524)
@@ -285,7 +285,7 @@
#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
More information about the Midnightbsd-cvs
mailing list