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

This reverts commit f717bb5249caea550bc6e2baeb09ca309ad83b39.

Causes issues in our testing environment. Default route via host is
preferred if no gateway is set in the installed routes.  Needs some
investigation.

References strongswan/strongswan#2548
This commit is contained in:
Tobias Brunner 2025-03-03 09:46:14 +01:00
parent de30b6b385
commit 8c1714ba12

View File

@ -2075,6 +2075,10 @@ 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
{