From e40080fe17a37c0d525023edbdb95d77dca2921f Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 20 Nov 2015 22:58:03 +0100 Subject: [PATCH] net: M_IPIN_SKIPPFIL is the same as M_PROTO12 Make the patch more portable by using it directly. --- sys/netinet/ip_input.c | 6 +++--- sys/netpfil/ipfw/ip_dn_io.c | 2 +- sys/sys/mbuf.h | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index a51ddf80913..ffd797411ee 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -422,7 +422,7 @@ ip_input(struct mbuf *m) /* skip checksum checks if we came from dummynet, since we'll already have been here in that case */ - if (!(m->m_flags & M_IPIN_SKIPPFIL)) { + if (!(m->m_flags & M_PROTO12)) { if (m->m_pkthdr.csum_flags & CSUM_IP_CHECKED) { sum = !(m->m_pkthdr.csum_flags & CSUM_IP_VALID); } else { @@ -486,7 +486,7 @@ tooshort: /* Jump over all PFIL processing if hooks are not active. */ if (!PFIL_HOOKED(&V_inet_pfil_hook)) goto passin; - if (m->m_flags & M_IPIN_SKIPPFIL) { + if (m->m_flags & M_PROTO12) { /* OPNsense (original from m0n0wall): packet has already been through dummynet, and therefore also through ipnat (reversed processing order in OPNsense); we skip the pfil hooks to avoid ipnat being called again on @@ -498,7 +498,7 @@ tooshort: if (ipfw_tag != NULL) { m_tag_delete(m, ipfw_tag); } - m->m_flags &= ~M_IPIN_SKIPPFIL; + m->m_flags &= ~M_PROTO12; goto passin; } diff --git a/sys/netpfil/ipfw/ip_dn_io.c b/sys/netpfil/ipfw/ip_dn_io.c index 20291620517..ad8ceda5c62 100644 --- a/sys/netpfil/ipfw/ip_dn_io.c +++ b/sys/netpfil/ipfw/ip_dn_io.c @@ -662,7 +662,7 @@ dummynet_send(struct mbuf *m) break ; case DIR_IN : - m->m_flags |= M_IPIN_SKIPPFIL; + m->m_flags |= M_PROTO12; netisr_dispatch(NETISR_IP, m); break; diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index c3049695c62..7ff8c2f4899 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -232,7 +232,6 @@ struct mbuf { #define M_VLANTAG 0x00000080 /* ether_vtag is valid */ #define M_FLOWID 0x00000100 /* deprecated: flowid is valid */ #define M_NOFREE 0x00000200 /* do not free mbuf, embedded in cluster */ -#define M_IPIN_SKIPPFIL 0x00800000 /* OPNsense (original from m0n0wall): skip pfil processing in ip_input */ #define M_PROTO1 0x00001000 /* protocol-specific */ #define M_PROTO2 0x00002000 /* protocol-specific */