summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2015-04-20 18:01:58 +0200
committerLubomir Rintel <lkundrak@v3.sk>2015-04-22 09:59:24 +0200
commitd231162fbc3ed193d3e0a4a35d668dd5deb97f6c (patch)
tree1a0a344be2b90110a3b85451ed53ae190ddea9fd
parent7271e168b09cbf6e4ea4a30f0093d8edd6db6821 (diff)
downloadNetworkManager-d231162fbc3ed193d3e0a4a35d668dd5deb97f6c.tar.gz
nm-ip[64]-config: set ifindex when replacing a duplicate route
Otherwise it stays zero and hits an assertion when the route is applied: NetworkManager:ERROR:nm-route-manager.c:179:nm_route_manager_ip4_route_sync: assertion failed: (known_route->ifindex) https://bugzilla.gnome.org/show_bug.cgi?id=745844
-rw-r--r--src/nm-ip4-config.c1
-rw-r--r--src/nm-ip6-config.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c
index 8b1596dd0d..abc8af836a 100644
--- a/src/nm-ip4-config.c
+++ b/src/nm-ip4-config.c
@@ -1288,6 +1288,7 @@ nm_ip4_config_add_route (NMIP4Config *config, const NMPlatformIP4Route *new)
memcpy (item, new, sizeof (*item));
/* Restore highest priority source */
item->source = MAX (old_source, new->source);
+ item->ifindex = priv->ifindex;
goto NOTIFY;
}
}
diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
index 2077af81b3..9d4bf47b20 100644
--- a/src/nm-ip6-config.c
+++ b/src/nm-ip6-config.c
@@ -1289,6 +1289,7 @@ nm_ip6_config_add_route (NMIP6Config *config, const NMPlatformIP6Route *new)
*item = *new;
/* Restore highest priority source */
item->source = MAX (old_source, new->source);
+ item->ifindex = priv->ifindex;
goto NOTIFY;
}
}