Skip to content

tcp: make TCP-AO lookups more predictable

Eric Dumazet netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tcp: fix TCP-AO key lookup precedence (shadowing)net/ipv4/tcp_ao.c+26 -10 replies
2/2selftests/net: Add TCP-AO key shadowing testtools/testing/selftests/net/tcp_ao/Makefile tools/testing/selftests/net/tcp_ao/shadowing.c+94 -01 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH net 0/2] tcp: make TCP-AO lookups more predictable

This series fixes a TCP-AO key lookup precedence bug.

TCP-AO stores MKTs in an unsorted list and returns the first match. This allows newer, less-specific keys (wildcard VRF or shorter prefixes) to shadow older, more-specific keys if inserted later.

Fix this by implementing sorted insertion in tcp_ao_link_mkt() based on key specificity (VRF binding, then prefix length). This keeps the RX lookup path fast while ensuring correctness.

The second patch adds a selftest to verify this behavior.

Eric Dumazet (2):
tcp: fix TCP-AO key lookup precedence (shadowing) selftests/net: Add TCP-AO key shadowing test

 net/ipv4/tcp_ao.c                             | 27 +++++-
 tools/testing/selftests/net/tcp_ao/Makefile   |  1 +
 .../testing/selftests/net/tcp_ao/shadowing.c  | 93 +++++++++++++++++++
 3 files changed, 120 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/net/tcp_ao/shadowing.c
Signature · 1 line
2.55.0.rc0.799.gd6f94ed593-goog