[PATCH] netlink: Allow NULL to be passed as addr parameter to nl_addr_get (again)
A recent fix to nl_addr_get() unfortunately introduced a different problem.
251e676bd0bf removed a test if @addr was non-NULL. conf_ip6() relied on
being able to pass NULL in order to update the link-local address without
updating the main address (because it was already set by the user).
This means that 'pasta -a 2001:db8::1' will SEGV. Reverse the incorrect
part of the change to fix this.
Fixes: 251e676bd0bf ("netlink: Return prefix length for IPv6 addresses in nl_addr_get()")
Signed-off-by: David Gibson
On Wed, 11 Mar 2026 15:13:57 +1100
David Gibson
A recent fix to nl_addr_get() unfortunately introduced a different problem. 251e676bd0bf removed a test if @addr was non-NULL. conf_ip6() relied on being able to pass NULL in order to update the link-local address without updating the main address (because it was already set by the user).
This means that 'pasta -a 2001:db8::1' will SEGV. Reverse the incorrect part of the change to fix this.
Ouch, sorry. I totally misinterpreted the check on 'addr' (my own check, by the way) and suggested to Jon that it could be skipped.
Fixes: 251e676bd0bf ("netlink: Return prefix length for IPv6 addresses in nl_addr_get()") Signed-off-by: David Gibson
Applied. -- Stefano
participants (2)
-
David Gibson
-
Stefano Brivio