mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-25 01:20:36 +01:00
core: look at route sources when assuming a connection
When generating an NMConnection to match the current state of a device, don't add its RA-provided and DHCP-provided routes to the NMSettingIP4Config/NMSettingIP6Config, since those routes didn't come from the connection profile before. https://bugzilla.gnome.org/show_bug.cgi?id=729203
This commit is contained in:
parent
662ade1e47
commit
9f195559d2
2 changed files with 8 additions and 0 deletions
|
|
@ -444,6 +444,10 @@ nm_ip4_config_create_setting (const NMIP4Config *config)
|
|||
if (!route->plen)
|
||||
continue;
|
||||
|
||||
/* Ignore routes provided by external sources */
|
||||
if (route->source != NM_PLATFORM_SOURCE_USER)
|
||||
continue;
|
||||
|
||||
s_route = nm_ip4_route_new ();
|
||||
nm_ip4_route_set_dest (s_route, route->network);
|
||||
nm_ip4_route_set_prefix (s_route, route->plen);
|
||||
|
|
|
|||
|
|
@ -551,6 +551,10 @@ nm_ip6_config_create_setting (const NMIP6Config *config)
|
|||
if (!route->plen)
|
||||
continue;
|
||||
|
||||
/* Ignore routes provided by external sources */
|
||||
if (route->source != NM_PLATFORM_SOURCE_USER)
|
||||
continue;
|
||||
|
||||
s_route = nm_ip6_route_new ();
|
||||
nm_ip6_route_set_dest (s_route, &route->network);
|
||||
nm_ip6_route_set_prefix (s_route, route->plen);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue