vxlan: Fix NPDs when using nexthop objects
Status from this message: This series was applied to netdev/net.git (main)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | vxlan: Fix NPD when refreshing an FDB entry with a nexthop objectdrivers/ drivers/ | +5 | 1 reply | Applied |
| 2/3 | vxlan: Fix NPD in {arp,neigh}_reduce() when using nexthop objectsdrivers/ | +8 | 1 reply | Applied |
| 3/3 | selftests: net: Add a selftest for VXLAN with FDB nexthop groupstools/ tools/ | +224 | 1 reply | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Petr Machata | Nikolay Aleksandrov |
|---|---|---|
| 1/3 | R-b | R-b |
| 2/3 | R-b | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net 0/3] vxlan: Fix NPDs when using nexthop objects
With FDB nexthop groups, VXLAN FDB entries do not necessarily point to a remote destination but rather to an FDB nexthop group. This means that first_remote_{rcu,rtnl}() can return NULL and a few places in the driver were not ready for that, resulting in NULL pointer dereferences. Patches #1-#2 fix these NPDs.
Note that vxlan_fdb_find_uc() still dereferences the remote returned by first_remote_rcu() without checking that it is not NULL, but this function is only invoked by a single driver which vetoes the creation of FDB nexthop groups. I will patch this in net-next to make the code less fragile.
Patch #3 adds a selftests which exercises these code paths and tests basic Tx functionality with FDB nexthop groups. I verified that the test crashes the kernel without the first two patches.
Ido Schimmel (3):
vxlan: Fix NPD when refreshing an FDB entry with a nexthop object
vxlan: Fix NPD in {arp,neigh}_reduce() when using nexthop objects
selftests: net: Add a selftest for VXLAN with FDB nexthop groups
drivers/net/vxlan/vxlan_core.c | 18 +- drivers/net/vxlan/vxlan_private.h | 4 +- tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/test_vxlan_nh.sh | 223 +++++++++++++++++++ 4 files changed, 237 insertions(+), 9 deletions(-) create mode 100755 tools/testing/selftests/net/test_vxlan_nh.sh
Signature · 1 line
2.51.0