diff options
author | Andy Kling <andreas.kling@peiker-cee.de> | 2019-02-20 10:20:14 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2019-07-15 15:16:37 +0000 |
commit | 812f4df6c34d7f6b43189fd79038836edd516cd3 (patch) | |
tree | b7ad7545369fe8ac8c30f064b0b4d6d175577e60 | |
parent | b434521d68c959e64faf9467c38f413e8a9d99db (diff) | |
download | NetworkManager-812f4df6c34d7f6b43189fd79038836edd516cd3.tar.gz |
libnm-core: 802-11-wireless.mode mesh requires band and channel
an essential feature of 802.11s is to allow moving/mobile mesh points
and adapt the topology dynamically. This includes starting a mesh point
not in range of others and establish the connection once it comes into
range. At the moment for this reason a mesh connection requires the
frequency to be fixed as supplicant does too.
-rw-r--r-- | libnm-core/nm-setting-wireless.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libnm-core/nm-setting-wireless.c b/libnm-core/nm-setting-wireless.c index 4f40d4ea85..3de3e9a94f 100644 --- a/libnm-core/nm-setting-wireless.c +++ b/libnm-core/nm-setting-wireless.c @@ -830,6 +830,16 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } } + if ((g_strcmp0 (priv->mode, NM_SETTING_WIRELESS_MODE_MESH) == 0) && !(priv->channel && priv->band)) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_MISSING_PROPERTY, + _("'%s' requires '%s' and '%s' property"), + priv->mode, NM_SETTING_WIRELESS_BAND, NM_SETTING_WIRELESS_CHANNEL); + g_prefix_error (error, "%s.%s: ", NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_MODE); + return FALSE; + } + if (priv->bssid && !nm_utils_hwaddr_valid (priv->bssid, ETH_ALEN)) { g_set_error_literal (error, NM_CONNECTION_ERROR, |