extra security : remove duplicates in station profile

Signed-off-by: shivamcandela <shivam.thakur@candelatech.com>
This commit is contained in:
shivamcandela
2021-05-24 01:31:59 +05:30
parent 6476e4aec0
commit 86f33f759f

View File

@@ -195,8 +195,14 @@ class StationProfile:
def add_security_extra(self, security):
types = {"wep": "wep_enable", "wpa": "wpa_enable", "wpa2": "wpa2_enable", "wpa3": "use-wpa3", "open": "[BLANK]"}
if self.desired_add_sta_flags.__contains__(types[security]) and \
self.desired_add_sta_flags_mask.__contains__(types[security]):
self.desired_add_sta_flags.remove(types[security])
self.desired_add_sta_flags_mask.remove(types[security])
self.desired_add_sta_flags.append(types[security])
self.desired_add_sta_flags_mask.append(types[security])
if security == "wpa3":
self.set_command_param("add_sta", "ieee80211w", 2)
def set_command_param(self, command_name, param_name, param_value):
# we have to check what the param name is