diff --git a/src/core/nm-l3cfg.c b/src/core/nm-l3cfg.c index 46bdac234b..2ea93677ea 100644 --- a/src/core/nm-l3cfg.c +++ b/src/core/nm-l3cfg.c @@ -2885,9 +2885,15 @@ nm_l3cfg_remove_config(NML3Cfg *self, gconstpointer tag, const NML3ConfigData *i } gboolean -nm_l3cfg_remove_config_all(NML3Cfg *self, gconstpointer tag, gboolean only_dirty) +nm_l3cfg_remove_config_all(NML3Cfg *self, gconstpointer tag) { - return _l3cfg_remove_config(self, tag, only_dirty, NULL); + return _l3cfg_remove_config(self, tag, FALSE, NULL); +} + +gboolean +nm_l3cfg_remove_config_all_dirty(NML3Cfg *self, gconstpointer tag) +{ + return _l3cfg_remove_config(self, tag, TRUE, NULL); } /*****************************************************************************/ diff --git a/src/core/nm-l3cfg.h b/src/core/nm-l3cfg.h index 037f21784d..d4438cbe3a 100644 --- a/src/core/nm-l3cfg.h +++ b/src/core/nm-l3cfg.h @@ -295,7 +295,8 @@ gboolean nm_l3cfg_add_config(NML3Cfg * self, gboolean nm_l3cfg_remove_config(NML3Cfg *self, gconstpointer tag, const NML3ConfigData *ifcfg); -gboolean nm_l3cfg_remove_config_all(NML3Cfg *self, gconstpointer tag, gboolean only_dirty); +gboolean nm_l3cfg_remove_config_all(NML3Cfg *self, gconstpointer tag); +gboolean nm_l3cfg_remove_config_all_dirty(NML3Cfg *self, gconstpointer tag); /*****************************************************************************/ diff --git a/src/core/tests/test-l3cfg.c b/src/core/tests/test-l3cfg.c index d877b5dc5a..2ef9f36eb8 100644 --- a/src/core/tests/test-l3cfg.c +++ b/src/core/tests/test-l3cfg.c @@ -490,7 +490,7 @@ test_l3cfg(gconstpointer test_data) if (nmtst_get_rand_one_case_in(3)) _test_fixture_1_teardown(&test_fixture); - nm_l3cfg_remove_config_all(l3cfg0, GINT_TO_POINTER('a'), FALSE); + nm_l3cfg_remove_config_all(l3cfg0, GINT_TO_POINTER('a')); if (nmtst_get_rand_one_case_in(3)) _test_fixture_1_teardown(&test_fixture); @@ -615,8 +615,7 @@ _test_l3_ipv4ll_signal_notify(NML3Cfg * l3cfg, _LOGT("remove address %s that previously passed ACD", _nm_utils_inet4_ntop(tdata->addr_commit_addr, sbuf_addr)); if (!nm_l3cfg_remove_config_all(nm_l3_ipv4ll_get_l3cfg(tdata->l3ipv4ll), - TEST_L3_IPV4LL_TAG(tdata, 1), - FALSE)) + TEST_L3_IPV4LL_TAG(tdata, 1))) g_assert_not_reached(); nm_l3cfg_commit_on_idle_schedule(nm_l3_ipv4ll_get_l3cfg(tdata->l3ipv4ll)); nm_l3cfg_commit_type_unregister(nm_l3_ipv4ll_get_l3cfg(tdata->l3ipv4ll), @@ -766,9 +765,7 @@ test_l3_ipv4ll(gconstpointer test_data) _LOGT("poll 1 end"); if (tdata->addr_commit || nmtst_get_rand_bool()) { - nm_l3cfg_remove_config_all(nm_l3_ipv4ll_get_l3cfg(l3ipv4ll), - TEST_L3_IPV4LL_TAG(tdata, 1), - FALSE); + nm_l3cfg_remove_config_all(nm_l3_ipv4ll_get_l3cfg(l3ipv4ll), TEST_L3_IPV4LL_TAG(tdata, 1)); } nmtstp_acd_defender_destroy(g_steal_pointer(&acd_defender_1));