]> git.dujemihanovic.xyz Git - linux.git/commit
ipv6: fix ndisc_is_useropt() handling for PIO
authorMaciej Żenczykowski <maze@google.com>
Tue, 30 Jul 2024 00:17:48 +0000 (17:17 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 1 Aug 2024 09:40:29 +0000 (11:40 +0200)
commita46c68debf3be3a477a69ccbf0a1d050df841676
treefed89c57135e389343d10e0c6e28c62fcb944b3c
parentb9e7fc0aeda79031a101610b2fcb12bf031056e9
ipv6: fix ndisc_is_useropt() handling for PIO

The current logic only works if the PIO is between two
other ND user options.  This fixes it so that the PIO
can also be either before or after other ND user options
(for example the first or last option in the RA).

side note: there's actually Android tests verifying
a portion of the old broken behaviour, so:
  https://android-review.googlesource.com/c/kernel/tests/+/3196704
fixes those up.

Cc: Jen Linkova <furry@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: Patrick Rohr <prohr@google.com>
Cc: David Ahern <dsahern@kernel.org>
Cc: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Cc: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Fixes: 048c796beb6e ("ipv6: adjust ndisc_is_useropt() to also return true for PIO")
Link: https://patch.msgid.link/20240730001748.147636-1-maze@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv6/ndisc.c