core: log route-table-sync-mode in nm_device_set_ip_config()

This commit is contained in:
Thomas Haller
2021-03-23 17:56:37 +01:00
parent 5da8c073ef
commit f6db2c6261

View File

@@ -13483,7 +13483,8 @@ nm_device_set_ip_config(NMDevice * self,
NMIPConfig * old_config; NMIPConfig * old_config;
gboolean has_changes = FALSE; gboolean has_changes = FALSE;
gboolean success = TRUE; gboolean success = TRUE;
NMSettingsConnection *settings_connection; NMSettingsConnection * settings_connection;
NMIPRouteTableSyncMode route_table_sync_mode;
nm_assert_addr_family(addr_family); nm_assert_addr_family(addr_family);
nm_assert(!new_config || nm_ip_config_get_addr_family(new_config) == addr_family); nm_assert(!new_config || nm_ip_config_get_addr_family(new_config) == addr_family);
@@ -13495,11 +13496,18 @@ nm_device_set_ip_config(NMDevice * self,
}))); })));
nm_assert(IS_IPv4 || !ip4_dev_route_blacklist); nm_assert(IS_IPv4 || !ip4_dev_route_blacklist);
if (commit && new_config)
route_table_sync_mode = _get_route_table_sync_mode_stateful(self, addr_family);
else
route_table_sync_mode = NM_IP_ROUTE_TABLE_SYNC_MODE_NONE;
_LOGD(LOGD_IPX(IS_IPv4), _LOGD(LOGD_IPX(IS_IPv4),
"ip%c-config: update (commit=%d, new-config=" NM_HASH_OBFUSCATE_PTR_FMT")", "ip%c-config: update (commit=%d, new-config=" NM_HASH_OBFUSCATE_PTR_FMT
", route-table-sync-mode=%d)",
nm_utils_addr_family_to_char(addr_family), nm_utils_addr_family_to_char(addr_family),
commit, commit,
NM_HASH_OBFUSCATE_PTR(new_config)); NM_HASH_OBFUSCATE_PTR(new_config),
(int) route_table_sync_mode);
/* Always commit to nm-platform to update lifetimes */ /* Always commit to nm-platform to update lifetimes */
if (commit && new_config) { if (commit && new_config) {
@@ -13508,7 +13516,7 @@ nm_device_set_ip_config(NMDevice * self,
if (IS_IPv4) { if (IS_IPv4) {
success = nm_ip4_config_commit(NM_IP4_CONFIG(new_config), success = nm_ip4_config_commit(NM_IP4_CONFIG(new_config),
nm_device_get_platform(self), nm_device_get_platform(self),
_get_route_table_sync_mode_stateful(self, AF_INET)); route_table_sync_mode);
nm_platform_ip4_dev_route_blacklist_set(nm_device_get_platform(self), nm_platform_ip4_dev_route_blacklist_set(nm_device_get_platform(self),
nm_ip_config_get_ifindex(new_config), nm_ip_config_get_ifindex(new_config),
ip4_dev_route_blacklist); ip4_dev_route_blacklist);
@@ -13517,7 +13525,7 @@ nm_device_set_ip_config(NMDevice * self,
success = nm_ip6_config_commit(NM_IP6_CONFIG(new_config), success = nm_ip6_config_commit(NM_IP6_CONFIG(new_config),
nm_device_get_platform(self), nm_device_get_platform(self),
_get_route_table_sync_mode_stateful(self, AF_INET6), route_table_sync_mode,
&temporary_not_available); &temporary_not_available);
if (!_rt6_temporary_not_available_set(self, temporary_not_available)) if (!_rt6_temporary_not_available_set(self, temporary_not_available))