core: fix setting IPv6 default route

Seems that NLM_F_CREATE isn't enough, we need to replace anything
that's already there.  Oddly, this is even though we already cleaned
out anything that was already there.
This commit is contained in:
Dan Williams 2013-02-19 17:48:36 -06:00
parent f96a42b0e2
commit ddbb13bcc6

View file

@ -1167,7 +1167,7 @@ add_default_ip6_route (int ifindex, const struct in6_addr *gw, int mss)
g_return_val_if_fail (route != NULL, -ENOMEM);
/* Add the new default route */
err = nm_netlink_route6_add (route, &in6addr_any, 0, gw, NLM_F_CREATE);
err = nm_netlink_route6_add (route, &in6addr_any, 0, gw, NLM_F_CREATE | NLM_F_REPLACE);
if (err == -NLE_EXIST)
err = 0;