mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 23:50:10 +01:00
l3cfg: change NM_L3_CONFIG_MERGE_FLAGS_ONLY_FOR_ACD to be a NML3CfgConfigFlags value
It's really not related to NML3ConfigMergeFlags, but fits better to NML3CfgConfigFlags.
This commit is contained in:
parent
4c3eed28cd
commit
3b92ad8b6d
4 changed files with 22 additions and 18 deletions
|
|
@ -52,15 +52,6 @@ typedef enum {
|
|||
/**
|
||||
* NML3ConfigMergeFlags:
|
||||
* @NM_L3_CONFIG_MERGE_FLAGS_NONE: no flags set
|
||||
* @NM_L3_CONFIG_MERGE_FLAGS_ONLY_FOR_ACD: if this merge flag is set,
|
||||
* the the NML3ConfigData doesn't get merged and it's information won't be
|
||||
* synced. The only purpose is to run ACD on its IPv4 addresses, but
|
||||
* regardless whether ACD succeeds/fails, the IP addresses won't be configured.
|
||||
* The point is to run ACD first (without configuring it), and only
|
||||
* commit the settings if requested. That can either happen by
|
||||
* nm_l3cfg_add_config() the same NML3Cfg again (with a different
|
||||
* tag), or by calling nm_l3cfg_add_config() again with this flag
|
||||
* cleared (and the same tag).
|
||||
* @NM_L3_CONFIG_MERGE_FLAGS_NO_ROUTES: don't merge routes
|
||||
* @NM_L3_CONFIG_MERGE_FLAGS_NO_DEFAULT_ROUTES: don't merge default routes.
|
||||
* Note that if the respective NML3ConfigData has NM_L3_CONFIG_DAT_FLAGS_IGNORE_MERGE_NO_DEFAULT_ROUTES
|
||||
|
|
@ -71,11 +62,10 @@ typedef enum {
|
|||
*/
|
||||
typedef enum _nm_packed {
|
||||
NM_L3_CONFIG_MERGE_FLAGS_NONE = 0,
|
||||
NM_L3_CONFIG_MERGE_FLAGS_ONLY_FOR_ACD = (1LL << 0),
|
||||
NM_L3_CONFIG_MERGE_FLAGS_NO_ROUTES = (1LL << 1),
|
||||
NM_L3_CONFIG_MERGE_FLAGS_NO_DEFAULT_ROUTES = (1LL << 2),
|
||||
NM_L3_CONFIG_MERGE_FLAGS_NO_DNS = (1LL << 3),
|
||||
NM_L3_CONFIG_MERGE_FLAGS_CLONE = (1LL << 4),
|
||||
NM_L3_CONFIG_MERGE_FLAGS_NO_ROUTES = (1LL << 0),
|
||||
NM_L3_CONFIG_MERGE_FLAGS_NO_DEFAULT_ROUTES = (1LL << 1),
|
||||
NM_L3_CONFIG_MERGE_FLAGS_NO_DNS = (1LL << 2),
|
||||
NM_L3_CONFIG_MERGE_FLAGS_CLONE = (1LL << 3),
|
||||
} NML3ConfigMergeFlags;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -593,8 +593,8 @@ _l3cd_config_add(NML3IPv4LL *self)
|
|||
0,
|
||||
NM_L3_ACD_DEFEND_TYPE_ONCE,
|
||||
self->reg_timeout_msec,
|
||||
NM_L3CFG_CONFIG_FLAGS_NONE,
|
||||
NM_L3_CONFIG_MERGE_FLAGS_ONLY_FOR_ACD))
|
||||
NM_L3CFG_CONFIG_FLAGS_ONLY_FOR_ACD,
|
||||
NM_L3_CONFIG_MERGE_FLAGS_NONE))
|
||||
nm_assert_not_reached();
|
||||
|
||||
self->l3cfg_commit_handle = nm_l3cfg_commit_type_register(self->l3cfg,
|
||||
|
|
|
|||
|
|
@ -3043,7 +3043,7 @@ _l3cfg_update_combined_config(NML3Cfg * self,
|
|||
for (i = 0; i < l3_config_datas_len; i++) {
|
||||
const L3ConfigData *l3cd_data = l3_config_datas_arr[i];
|
||||
|
||||
if (NM_FLAGS_HAS(l3cd_data->merge_flags, NM_L3_CONFIG_MERGE_FLAGS_ONLY_FOR_ACD))
|
||||
if (NM_FLAGS_HAS(l3cd_data->config_flags, NM_L3CFG_CONFIG_FLAGS_ONLY_FOR_ACD))
|
||||
continue;
|
||||
|
||||
hook_data.tag = l3cd_data->tag_confdata;
|
||||
|
|
|
|||
|
|
@ -28,8 +28,22 @@ typedef enum _nm_packed {
|
|||
NM_L3_ACD_DEFEND_TYPE_ALWAYS,
|
||||
} NML3AcdDefendType;
|
||||
|
||||
/**
|
||||
* NML3CfgConfigFlags:
|
||||
* @NM_L3CFG_CONFIG_FLAGS_NONE: no flags, the default.
|
||||
* @NM_L3_CONFIG_MERGE_FLAGS_ONLY_FOR_ACD: if this merge flag is set,
|
||||
* the the NML3ConfigData doesn't get merged and it's information won't be
|
||||
* synced. The only purpose is to run ACD on its IPv4 addresses, but
|
||||
* regardless whether ACD succeeds/fails, the IP addresses won't be configured.
|
||||
* The point is to run ACD first (without configuring it), and only
|
||||
* commit the settings if requested. That can either happen by
|
||||
* nm_l3cfg_add_config() the same NML3Cfg again (with a different
|
||||
* tag), or by calling nm_l3cfg_add_config() again with this flag
|
||||
* cleared (and the same tag).
|
||||
*/
|
||||
typedef enum _nm_packed {
|
||||
NM_L3CFG_CONFIG_FLAGS_NONE = 0,
|
||||
NM_L3CFG_CONFIG_FLAGS_NONE = 0,
|
||||
NM_L3CFG_CONFIG_FLAGS_ONLY_FOR_ACD = (1LL << 0),
|
||||
} NML3CfgConfigFlags;
|
||||
|
||||
typedef enum _nm_packed {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue