core: fix selecting of best-default-route to consider only unicast routes

Fixes: 5d0d13f570 ('platform: add support for local routes')
This commit is contained in:
Thomas Haller
2020-07-21 18:06:21 +02:00
parent 5035687a7b
commit 2a1bac6b8a

View File

@@ -83,7 +83,8 @@ nm_ip_config_best_default_route_is (const NMPObject *obj)
* Note that this only considers the main routing table. */
return r
&& NM_PLATFORM_IP_ROUTE_IS_DEFAULT (r)
&& nm_platform_route_table_is_main (r->table_coerced);
&& nm_platform_route_table_is_main (r->table_coerced)
&& r->type_coerced == nm_platform_route_type_coerce (1 /*RTN_UNICAST*/);
}
const NMPObject *_nm_ip_config_best_default_route_find_better (const NMPObject *obj_cur, const NMPObject *obj_cmp);