]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
kernel-netlink: Don't fallback to peer address as gateway
authorTobias Brunner <tobias@strongswan.org>
Fri, 29 Nov 2024 13:57:31 +0000 (14:57 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 28 Feb 2025 15:01:49 +0000 (16:01 +0100)
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

src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c

index 416ae78116738d95ce4ee12e08214fb9192ed7e3..7d49d73b4ff94dd1eb915b793512f9cc9d2e9a85 100644 (file)
@@ -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
        {