kernel-netlink: Don't fallback to peer address as gateway

This doesn't really seem useful (perhaps it was before we started to
configure the outbound interface on our routes). And it can actually
cause the route installation to fail e.g. for routes over point-to-point
interfaces where we'd get "Error: Nexthop has invalid gateway" errors.

Closes strongswan/strongswan#2548
This commit is contained in:
Tobias Brunner
2025-02-28 16:01:49 +01:00
parent 9c97ecbb31
commit f717bb5249
@@ -2075,10 +2075,6 @@ static host_t *get_route(private_kernel_netlink_net_t *this, host_t *dest,
*iface = get_interface_name_by_index(this, best->oif);
}
}
if (!addr && !match_net)
{ /* fallback to destination address */
addr = dest->clone(dest);
}
}
else
{