[NETFILTER]: nf_conntrack: reduce masks to a subset of tuples
Since conntrack currently allows to use masks for every bit of both helper and expectation tuples, we can't hash them and have to keep them on two global lists that are searched for every new connection. This patch removes the never used ability to use masks for the destination part of the expectation tuple and completely removes masks from helpers since the only reasonable choice is a full match on l3num, protonum and src.u.all. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
df43b4e7ca
commit
d4156e8cd9
@ -1276,9 +1276,6 @@ static struct nf_conntrack_helper snmp_helper __read_mostly = {
|
||||
.tuple.src.l3num = AF_INET,
|
||||
.tuple.src.u.udp.port = __constant_htons(SNMP_PORT),
|
||||
.tuple.dst.protonum = IPPROTO_UDP,
|
||||
.mask.src.l3num = 0xFFFF,
|
||||
.mask.src.u.udp.port = __constant_htons(0xFFFF),
|
||||
.mask.dst.protonum = 0xFF,
|
||||
};
|
||||
|
||||
static struct nf_conntrack_helper snmp_trap_helper __read_mostly = {
|
||||
@ -1290,9 +1287,6 @@ static struct nf_conntrack_helper snmp_trap_helper __read_mostly = {
|
||||
.tuple.src.l3num = AF_INET,
|
||||
.tuple.src.u.udp.port = __constant_htons(SNMP_TRAP_PORT),
|
||||
.tuple.dst.protonum = IPPROTO_UDP,
|
||||
.mask.src.l3num = 0xFFFF,
|
||||
.mask.src.u.udp.port = __constant_htons(0xFFFF),
|
||||
.mask.dst.protonum = 0xFF,
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
|
Reference in New Issue
Block a user