From 61d50da9458ddc36997b20022d4c74a207c4f2d5 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Tue, 19 Apr 2022 18:39:37 +0200 Subject: [PATCH] l3cfg: add addresses during obj sync even if commit is ASSUME If a connection is configured to use dhcp4 and NetworkManager service is restarted before the IPv4 address is configured on the interface, the connection will fail during the activation because the address is missing. This will modify the meaning of assume because it will be more intrusive. Anyway, ASSUME still makes sense because the commit type is the lease intrusive. --- src/core/nm-l3cfg.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/core/nm-l3cfg.c b/src/core/nm-l3cfg.c index e6a7858c44..ed15cab4af 100644 --- a/src/core/nm-l3cfg.c +++ b/src/core/nm-l3cfg.c @@ -768,14 +768,6 @@ _nm_n_acd_data_probe_new(NML3Cfg *self, in_addr_t addr, guint32 timeout_msec, gp } \ G_STMT_END -static gboolean -_obj_state_data_get_assume_config_once(const ObjStateData *obj_state) -{ - nm_assert_obj_state(NULL, obj_state); - - return nmp_object_get_assume_config_once(obj_state->obj); -} - static ObjStateData * _obj_state_data_new(const NMPObject *obj, const NMPObject *plobj) { @@ -1054,10 +1046,6 @@ _obj_states_sync_filter(NML3Cfg *self, const NMPObject *obj, NML3CfgCommitType c nm_assert(c_list_is_empty(&obj_state->os_zombie_lst)); if (!obj_state->os_nm_configured) { - if (commit_type == NM_L3_CFG_COMMIT_TYPE_ASSUME - && !_obj_state_data_get_assume_config_once(obj_state)) - return FALSE; - obj_state->os_nm_configured = TRUE; _LOGD("obj-state: configure-first-time: %s",