[PATCH] netlink: fix rtnl_route_alloc_cache() call
- From: Michael Chapman <mike very puzzling org>
- To: networkmanager-list gnome org
- Subject: [PATCH] netlink: fix rtnl_route_alloc_cache() call
- Date: Mon, 13 May 2013 10:52:02 +1000
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 <mike very puzzling org>
---
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 3538f55..68391f5 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);
--
1.8.2.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]