From c43b7703cb4073746c2f31d95b880f83de5c016e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0imerda?= Date: Wed, 15 May 2013 16:40:07 +0200 Subject: [PATCH] netlink: fix rtnl_route_alloc_cache() call Same fix as in commit 195a09d7c0a57512b8e6298e97c3a3c4bad80fd0. NL_AUTO_PROVIDE is not a valid flag for this call and it's coincidental with ROUTE_CACHE_CONTENT, which is not what we want. One result arising from this fix is that per-device routes are now assigned priorities correctly. This means, for instance, you can have a wired and wireless connection on the same network, and have the wired connection always take precedence whilst it's available. Signed-off-by: Michael Chapman --- src/nm-netlink-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nm-netlink-utils.c b/src/nm-netlink-utils.c index 3538f5575c..68391f5dfa 100644 --- a/src/nm-netlink-utils.c +++ b/src/nm-netlink-utils.c @@ -462,7 +462,7 @@ nm_netlink_foreach_route (int ifindex, info.user_data = user_data; info.iface = nm_netlink_index_to_iface (ifindex); - rtnl_route_alloc_cache (nm_netlink_get_default_handle (), family, NL_AUTO_PROVIDE, &cache); + rtnl_route_alloc_cache (nm_netlink_get_default_handle (), family, 0, &cache); g_warn_if_fail (cache != NULL); if (cache) { nl_cache_foreach (cache, foreach_route_cb, &info);