Thread (17 messages) 17 messages, 3 authors, 18h ago

Re: [PATCH net-next 5/5] bridge: Use ndisc_parse_options() to parse ND options in br_nd_send()

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: 2026-07-20 09:27:12
Also in: bridge, lkml

On 19/07/2026 16:34, Danielle Ratson wrote:
Replace the manual ND option parsing loop in br_nd_send() with
ndisc_parse_options(), which provides proper validation and avoids the
class of bugs that were fixed by commit 53fc685243bd ("bridge: Avoid
infinite loop when suppressing NS messages with invalid options") and
commit 850837965af1 ("bridge: br_nd_send: validate ND option lengths").

Use ndisc_opt_addr_data() to extract the source link-layer address
from the parsed options, which correctly validates the option length
for the underlying device type.

Export ndisc_parse_options() so that it can be resolved from the bridge
when it is built as a module (CONFIG_BRIDGE=m); otherwise modpost fails
with an undefined symbol.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Danielle Ratson <redacted>
---
  net/bridge/br_arp_nd_proxy.c | 32 +++++++++++++++++---------------
  net/ipv6/ndisc.c             |  1 +
  2 files changed, 18 insertions(+), 15 deletions(-)
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help