From 2058defb2661d210bc7b9975d99c4962984977a1 Mon Sep 17 00:00:00 2001 From: Logan Lipke Date: Tue, 14 Jul 2020 11:58:55 -0700 Subject: [PATCH] Changed use_security to remove flags from desired_add_sta_flags/_mask, authentication type should work properly now --- py-json/realm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/py-json/realm.py b/py-json/realm.py index 182ac88c..55288822 100755 --- a/py-json/realm.py +++ b/py-json/realm.py @@ -902,6 +902,13 @@ class StationProfile: raise ValueError("use_security: %s requires ssid" % security_type) if (passwd is None) or ("" == passwd): raise ValueError("use_security: %s requires passphrase or [BLANK]" % security_type) + for name in types.values(): + if name in self.desired_add_sta_flags and name in self.desired_add_sta_flags_mask: + self.desired_add_sta_flags.remove(name) + self.desired_add_sta_flags_mask.remove(name) + self.desired_add_sta_flags.append(types[security_type]) + self.desired_add_sta_flags_mask.append(types[security_type]) + self.set_command_param("add_sta", "ssid", ssid) self.set_command_param("add_sta", "key", passwd) self.set_command_flag("add_sta", types[security_type], 1)