diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index a9dfb10188..a47b8f7b5e 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -6596,6 +6596,7 @@ static const NMMetaPropertyInfo *const property_infos_TEAM[] = { .property_typ_data = DEFINE_PROPERTY_TYP_DATA ( .values_static = VALUES_STATIC (NM_SETTING_TEAM_RUNNER_BROADCAST, NM_SETTING_TEAM_RUNNER_ROUNDROBIN, + NM_SETTING_TEAM_RUNNER_RANDOM, NM_SETTING_TEAM_RUNNER_ACTIVEBACKUP, NM_SETTING_TEAM_RUNNER_LOADBALANCE, NM_SETTING_TEAM_RUNNER_LACP), diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c index b49627c575..65e2634772 100644 --- a/libnm-core/nm-setting-team.c +++ b/libnm-core/nm-setting-team.c @@ -1171,6 +1171,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) if ( priv->runner && g_ascii_strcasecmp (priv->runner, NM_SETTING_TEAM_RUNNER_BROADCAST) && g_ascii_strcasecmp (priv->runner, NM_SETTING_TEAM_RUNNER_ROUNDROBIN) + && g_ascii_strcasecmp (priv->runner, NM_SETTING_TEAM_RUNNER_RANDOM) && g_ascii_strcasecmp (priv->runner, NM_SETTING_TEAM_RUNNER_ACTIVEBACKUP) && g_ascii_strcasecmp (priv->runner, NM_SETTING_TEAM_RUNNER_LOADBALANCE) && g_ascii_strcasecmp (priv->runner, NM_SETTING_TEAM_RUNNER_LACP)) { diff --git a/libnm-core/nm-setting-team.h b/libnm-core/nm-setting-team.h index f5e1290cd1..492b2a6602 100644 --- a/libnm-core/nm-setting-team.h +++ b/libnm-core/nm-setting-team.h @@ -131,6 +131,7 @@ NMTeamLinkWatcherArpPingFlags nm_team_link_watcher_get_flags (NMTeamLinkWatcher #define NM_SETTING_TEAM_RUNNER_BROADCAST "broadcast" #define NM_SETTING_TEAM_RUNNER_ROUNDROBIN "roundrobin" +#define NM_SETTING_TEAM_RUNNER_RANDOM "random" #define NM_SETTING_TEAM_RUNNER_ACTIVEBACKUP "activebackup" #define NM_SETTING_TEAM_RUNNER_LOADBALANCE "loadbalance" #define NM_SETTING_TEAM_RUNNER_LACP "lacp" diff --git a/libnm-core/tests/test-setting.c b/libnm-core/tests/test-setting.c index 239cb876da..d0e0b37772 100644 --- a/libnm-core/tests/test-setting.c +++ b/libnm-core/tests/test-setting.c @@ -968,6 +968,18 @@ test_runner_broadcast_sync_from_config (void) NULL); } +static void +test_runner_random_sync_from_config (void) +{ + _test_team_config_sync ("{\"runner\": {\"name\": \"random\"}}", + 0, 0, 0, 0, + NM_SETTING_TEAM_RUNNER_RANDOM, + NULL, + NULL, NULL, -1, + FALSE, FALSE, -1, -1, NULL, + NULL); +} + static void test_runner_activebackup_sync_from_config (void) { @@ -1605,6 +1617,8 @@ main (int argc, char **argv) test_runner_roundrobin_sync_from_config); g_test_add_func ("/libnm/settings/team/sync_runner_from_config_broadcast", test_runner_broadcast_sync_from_config); + g_test_add_func ("/libnm/settings/team/sync_runner_from_config_random", + test_runner_random_sync_from_config); g_test_add_func ("/libnm/settings/team/sync_runner_from_config_activebackup", test_runner_activebackup_sync_from_config); g_test_add_func ("/libnm/settings/team/sync_runner_from_config_loadbalance",