mbox series

[4.14.y,0/2] netfilter: nat: fix soft lockup when most ports are used

Message ID 20220203124155.16693-1-fw@strlen.de
Headers show
Series netfilter: nat: fix soft lockup when most ports are used | expand

Message

Florian Westphal Feb. 3, 2022, 12:41 p.m. UTC
First patch removes old rovers, they are inherently racy
and cause packet drops/delays.

Second patch avoids iterating entire range of ports: It takes way
too long when most tuples are in use.

First patch is slightly mangled; nf_nat_proto_common.c needs minor adjustment
in context.

Florian Westphal (2):
  netfilter: nat: remove l4 protocol port rovers
  netfilter: nat: limit port clash resolution attempts

 include/net/netfilter/nf_nat_l4proto.h |  2 +-
 net/netfilter/nf_nat_proto_common.c    | 36 ++++++++++++++++++--------
 net/netfilter/nf_nat_proto_dccp.c      |  5 +---
 net/netfilter/nf_nat_proto_sctp.c      |  5 +---
 net/netfilter/nf_nat_proto_tcp.c       |  5 +---
 net/netfilter/nf_nat_proto_udp.c       | 10 ++-----
 6 files changed, 31 insertions(+), 32 deletions(-)