Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/2] ipv6: rpl: fix loop detection for separated local addresses
@ 2026-09-11 23:11 Mark Amirkan via B4 Relay
  2026-09-11 23:11 ` [PATCH net 1/2] " Mark Amirkan via B4 Relay
  2026-09-11 23:11 ` [PATCH net 2/2] selftests: net: add RPL SRH loop test Mark Amirkan via B4 Relay
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Amirkan via B4 Relay @ 2026-09-11 23:11 UTC (permalink / raw)
  To: David Ahern, Ido Schimmel, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Alexander Aring,
	Shuah Khan
  Cc: netdev, linux-kernel, linux-kselftest, Mark Amirkan, stable

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>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-11 23:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 23:11 [PATCH net 0/2] ipv6: rpl: fix loop detection for separated local addresses Mark Amirkan via B4 Relay
2026-09-11 23:11 ` [PATCH net 1/2] " Mark Amirkan via B4 Relay
2026-09-11 23:11 ` [PATCH net 2/2] selftests: net: add RPL SRH loop test Mark Amirkan via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox