Skip to content

netfilter: nft_fib_ipv6: handle routes via external nexthop

Jiayuan Chen netfilter-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesIn review
  2. v12 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- new patch 1: list_for_each_entry_rcu() conversion split out (Suggested-by: Phil Sutter)
- patch 2:
* drop redundant ternary in nft_fib6_nh_match_dev_cb (Phil)
* drop redundant "!= 0" on nexthop_for_each_fib6_nh return (Phil)
* use READ_ONCE() for rt->fib6_nsiblings (Phil)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3netfilter: nft_fib_ipv6: walk fib6_siblings under RCUnet/ipv6/netfilter/nft_fib_ipv6.c+1 -10 replies
2/3netfilter: nft_fib_ipv6: handle routes via external nexthopnet/ipv6/netfilter/nft_fib_ipv6.c+16 -00 replies
3/3selftests: netfilter: add nft_fib_nexthop testtools/testing/selftests/net/netfilter/Makefile tools/testing/selftests/net/netfilter/nft_fib_nexthop.sh+153 -00 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPhil Sutter
SeriesA-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH nf v2 0/3] netfilter: nft_fib_ipv6: handle routes via external nexthop

Patch 1 switches the fib6_siblings walk in nft_fib6_info_nh_uses_dev() to list_for_each_entry_rcu().

Patch 2 fixes the slab-out-of-bounds when the matched route uses an external nexthop object.

Patch 3 adds a selftest covering single nh, nh group and old-style multipath.

v1: https://lore.kernel.org/netfilter-devel/[email protected]/

Changes since v1:
- new patch 1: list_for_each_entry_rcu() conversion split out (Suggested-by: Phil Sutter)
- patch 2:
* drop redundant ternary in nft_fib6_nh_match_dev_cb (Phil)
* drop redundant "!= 0" on nexthop_for_each_fib6_nh return (Phil)
* use READ_ONCE() for rt->fib6_nsiblings (Phil)

Jiayuan Chen (3):
netfilter: nft_fib_ipv6: walk fib6_siblings under RCU
netfilter: nft_fib_ipv6: handle routes via external nexthop
selftests: netfilter: add nft_fib_nexthop test

 net/ipv6/netfilter/nft_fib_ipv6.c             |  18 ++-
 .../testing/selftests/net/netfilter/Makefile  |   1 +
 .../net/netfilter/nft_fib_nexthop.sh          | 152 ++++++++++++++++++
 3 files changed, 170 insertions(+), 1 deletion(-)
 create mode 100755 tools/testing/selftests/net/netfilter/nft_fib_nexthop.sh
Signature · 1 line
2.43.0