default-route-manager: don't add entries with (!synced && never_default)

Entries with (!synced && never_default) make no sense. Don't add them
to the list of tracked entires.
This commit is contained in:
Thomas Haller 2015-07-13 12:29:18 +02:00
parent 09d5fa0392
commit befb36691a

View file

@ -792,8 +792,15 @@ _ipx_update_default_route (const VTableIP *vtable, NMDefaultRouteManager *self,
synced = TRUE;
}
}
g_assert (!default_route || default_route->plen == 0);
if (!synced && never_default) {
/* having a non-synced, never-default entry is non-sensical. Unset
* @default_route so that we don't add such an entry below. */
default_route = NULL;
}
if (!entry && !default_route)
/* nothing to do */;
else if (!entry) {