]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
wip: kernel-netlink: Restrict route priority comparison to the same routing table kernel-netlink-prio-table
authorTobias Brunner <tobias@strongswan.org>
Mon, 2 Jul 2018 08:56:15 +0000 (10:56 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 2 Jul 2018 08:58:42 +0000 (10:58 +0200)
The priority/metric is not a global property but only relevant locally
per routing table.

wip: On the other hand, this provided the only possibility to prioritize
routes with our lookup (not sure if anybody used it that way though).

src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c

index b6eb54370663d81cb77e4659b6102d1ba7d72336..6034f258b79bf4a469a3519118be47dd39d1555a 100644 (file)
@@ -2031,6 +2031,7 @@ static host_t *get_route(private_kernel_netlink_net_t *this, host_t *dest,
                                                break;
                                        }
                                        if (route->dst_len == other->dst_len &&
+                                               route->table == other->table &&
                                                route->priority < other->priority)
                                        {
                                                break;