From: Tobias Brunner Date: Mon, 2 Jul 2018 08:56:15 +0000 (+0200) Subject: wip: kernel-netlink: Restrict route priority comparison to the same routing table X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fkernel-netlink-prio-table;p=thirdparty%2Fstrongswan.git wip: kernel-netlink: Restrict route priority comparison to the same routing table 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). --- diff --git a/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c b/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c index b6eb543706..6034f258b7 100644 --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c @@ -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;