mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
net: M_IPIN_SKIPPFIL is the same as M_PROTO12
Make the patch more portable by using it directly.
This commit is contained in:
parent
453fe71bf8
commit
e40080fe17
3 changed files with 4 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue