mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 23:00:19 +01:00
core: fix creation of NMSettingIPConfig routes
Since commit4c2410bc92("platform: extend NMIPConfigSource to preserve the rtm_protocol field") the rt_source field of a NMPlatformIP{4,6}Route contains the RTPROT value read from kernel. Update checks on route source, otherwise existing routes are not picked up when a generated connection is created, breaking the connection matching. Fixes:4c2410bc92
This commit is contained in:
parent
b871106e25
commit
926ba925ec
2 changed files with 3 additions and 2 deletions
|
|
@ -632,7 +632,7 @@ nm_ip4_config_create_setting (const NMIP4Config *config)
|
|||
continue;
|
||||
|
||||
/* Ignore routes provided by external sources */
|
||||
if (route->rt_source != NM_IP_CONFIG_SOURCE_USER)
|
||||
if (route->rt_source != nmp_utils_ip_config_source_round_trip_rtprot (NM_IP_CONFIG_SOURCE_USER))
|
||||
continue;
|
||||
|
||||
s_route = nm_ip_route_new_binary (AF_INET,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "nm-utils.h"
|
||||
#include "nm-platform.h"
|
||||
#include "nm-platform-utils.h"
|
||||
#include "nm-route-manager.h"
|
||||
#include "nm-core-internal.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
|
|
@ -621,7 +622,7 @@ nm_ip6_config_create_setting (const NMIP6Config *config)
|
|||
continue;
|
||||
|
||||
/* Ignore routes provided by external sources */
|
||||
if (route->rt_source != NM_IP_CONFIG_SOURCE_USER)
|
||||
if (route->rt_source != nmp_utils_ip_config_source_round_trip_rtprot (NM_IP_CONFIG_SOURCE_USER))
|
||||
continue;
|
||||
|
||||
s_route = nm_ip_route_new_binary (AF_INET6,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue