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.

(cherry picked from commit befb36691a)
This commit is contained in:
Thomas Haller 2015-07-13 12:29:18 +02:00
parent a8dd15d745
commit ac8a90d3aa

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) {