tcp: make TCP-AO lookups more predictable
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | tcp: fix TCP-AO key lookup precedence (shadowing)net/ | +26 | 0 replies | |
| 2/2 | selftests/net: Add TCP-AO key shadowing testtools/ tools/ | +94 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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