Skip to content

netfilter: nat: fix regressions introduced by rhashtable conversion

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2netfilter: nat: fix cmp return valuenet/netfilter/nf_nat_core.c+6 -30 replies
2/2netfilter: nat: switch to new rhlist interfaceinclude/net/netfilter/nf_conntrack.h net/netfilter/nf_nat_core.c+25 -170 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nf 0/2] netfilter: nat: fix regressions introduced by rhashtable conversion

These two patches address bugs added when I converted the nat bysource hash to rhashtable.

First patch fixes object comparision, second patch converts nat bysource to the rhlist interface, we have to deal with identical source identities (distinct connections sharing same ip/port source pair).

Unfortunately the rhashlist interface isn't available in 4.8, so the question is how to address patch #2 for -stable.

One way would be to revert the rhashtable conversion, the other one would be to just set .insecure_elasticity in the rhashtable params.

The latter should work fine, as we do NOT need to identify the individual duplicate keys.

 include/net/netfilter/nf_conntrack.h |    2 -
 net/netfilter/nf_nat_core.c          |   49 +++++++++++++++++++++--------------
 2 files changed, 31 insertions(+), 20 deletions(-)