[RFC PATCH 6/8] libnm-core: 8021x: Allow a new eap value "extern"



To allow connections that mirror IWD's configured WPA-Enterprise
networks to be seen as valid by NM, add a new value for the eap key in
802-1x settings.  802-1x.eap stores EAP method names.  In the IWD
connections we don't know what EAP method is configured and we don't
have any of the other 802-1x properties that would be required for the
settings to verify.

Alternatively I could use a new flag property on the general connection
setting object to signal that some other settings are not visible or
editable.

Obviously these connections can't be activated on devices not controlled
by IWD.  This change may also need the eap=extern value to be documented
and checks may be needed to prevent this value from being used in
connections created through DBus.
---
 libnm-core/nm-setting-8021x.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c
index 3b4240e64..eda85ed8a 100644
--- a/libnm-core/nm-setting-8021x.c
+++ b/libnm-core/nm-setting-8021x.c
@@ -3088,6 +3088,7 @@ static EAPMethodsTable eap_methods_table[] = {
        { "sim", need_secrets_sim, NULL },
        { "gtc", need_secrets_password, verify_identity },
        { "otp", NULL, NULL },  // FIXME: implement
+       { "extern", NULL, NULL },
        { NULL, NULL, NULL }
 };
 
@@ -3203,7 +3204,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
 {
        NMSetting8021x *self = NM_SETTING_802_1X (setting);
        NMSetting8021xPrivate *priv = NM_SETTING_802_1X_GET_PRIVATE (self);
-       const char *valid_eap[] = { "leap", "md5", "tls", "peap", "ttls", "sim", "fast", "pwd", NULL };
+       const char *valid_eap[] = { "leap", "md5", "tls", "peap", "ttls", "sim", "fast", "pwd", "extern", 
NULL };
        const char *valid_phase1_peapver[] = { "0", "1", NULL };
        const char *valid_phase1_peaplabel[] = { "0", "1", NULL };
        const char *valid_phase1_fast_pac[] = { "0", "1", "2", "3", NULL };
-- 
2.14.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]