Skip to content
Snippets Groups Projects
Commit a05009d5 authored by Felix Fietkau's avatar Felix Fietkau Committed by Kenneth Johansson
Browse files

netfilter: reduce match memory access


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 1d5d74ca
Branches
Tags
No related merge requests found
...@@ -61,9 +61,9 @@ ip_packet_match(const struct iphdr *ip, ...@@ -61,9 +61,9 @@ ip_packet_match(const struct iphdr *ip,
if (ipinfo->flags & IPT_F_NO_DEF_MATCH) if (ipinfo->flags & IPT_F_NO_DEF_MATCH)
return true; return true;
if (NF_INVF(ipinfo, IPT_INV_SRCIP, if (NF_INVF(ipinfo, IPT_INV_SRCIP, ipinfo->smsk.s_addr &&
(ip->saddr & ipinfo->smsk.s_addr) != ipinfo->src.s_addr) || (ip->saddr & ipinfo->smsk.s_addr) != ipinfo->src.s_addr) ||
NF_INVF(ipinfo, IPT_INV_DSTIP, NF_INVF(ipinfo, IPT_INV_DSTIP, ipinfo->dmsk.s_addr &&
(ip->daddr & ipinfo->dmsk.s_addr) != ipinfo->dst.s_addr)) (ip->daddr & ipinfo->dmsk.s_addr) != ipinfo->dst.s_addr))
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment