[PATCH net 0/2] ipv6: rpl: fix loop detection for separated local addresses

Mark Amirkan via B4 Relay posted 2 patches 1 week, 6 days ago
net/ipv6/addrconf.c                         |  2 +-
tools/testing/selftests/net/Makefile        |  1 +
tools/testing/selftests/net/rpl_srh_loop.sh | 38 +++++++++++++++++++++++++++++
3 files changed, 40 insertions(+), 1 deletion(-)
[PATCH net 0/2] ipv6: rpl: fix loop detection for separated local addresses
Posted by Mark Amirkan via B4 Relay 1 week, 6 days ago
ipv6_chk_rpl_srh_loop() misses the shortest RPL loop pattern containing
two local addresses with a non-local address between them. The check is
made before the current local address is counted, so found is 1 rather
than greater than 1 when the second local address is reached.

Patch 1 fixes the condition. Patch 2 adds a selftest which verifies that
adjacent local addresses are accepted and separated local addresses are
rejected.

The selftest fails on the unmodified net tree and passes with the fix.

Signed-off-by: Mark Amirkan <markdamirkan@gmail.com>
---
Mark Amirkan (2):
      ipv6: rpl: fix loop detection for separated local addresses
      selftests: net: add RPL SRH loop test

 net/ipv6/addrconf.c                         |  2 +-
 tools/testing/selftests/net/Makefile        |  1 +
 tools/testing/selftests/net/rpl_srh_loop.sh | 38 +++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 1 deletion(-)
---
base-commit: 78445023439506ebd83b86d40b1e428a3b309d4a
change-id: 20260911-sympwn-rpl-send-c739b4c864a7

Best regards,
--  
Mark Amirkan <markdamirkan@gmail.com>