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
This commit is contained in:
Lubomir Rintel 2015-04-20 18:01:58 +02:00
parent 7271e168b0
commit d231162fbc
2 changed files with 2 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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;
}
}