If link_ipv6ll_gained() fails after ipv6ll_address is set, the address
remains non-null and the null-guard in address_update() never triggers
again, permanently suppressing SLAAC, DHCPv6 and RA on that link.
Clear ipv6ll_address on the failure path so the guard can fire when
the address is re-announced.
Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>
link->ipv6ll_address = address->in_addr.in6;
r = link_ipv6ll_gained(link);
- if (r < 0)
+ if (r < 0) {
+ link->ipv6ll_address = (const struct in6_addr) {};
return r;
+ }
}
if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))