network: make link_get_address() provide matching address with peer
As all callers do not care if the address has peer address.
This also drops prefixlen argument as it is always zero.
Fixes a bug introduced by 42f8b6a808.
Fixes #31950.
This commit is contained in:
@@ -1382,7 +1382,7 @@ static int ndisc_router_process_route(Link *link, sd_ndisc_router *rt) {
|
||||
if (r < 0)
|
||||
return log_link_warning_errno(link, r, "Failed to get gateway address from RA: %m");
|
||||
|
||||
if (link_get_ipv6_address(link, &gateway, 0, NULL) >= 0) {
|
||||
if (link_get_ipv6_address(link, &gateway, NULL) >= 0) {
|
||||
if (DEBUG_LOGGING)
|
||||
log_link_debug(link, "Advertised route gateway %s is local to the link, ignoring route",
|
||||
IN6_ADDR_TO_STRING(&gateway));
|
||||
|
||||
Reference in New Issue
Block a user