Fix auth mode WEP (#2235)

* Fix auth mode WEP

* fix mapping
This commit is contained in:
Pascal Vizeli 2020-11-10 18:07:20 +01:00 committed by GitHub
parent 9264d437b1
commit 7aceb21123
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -85,7 +85,7 @@
},
'802-11-wireless-security':
{
{% if interface.wifi.auth == "web" %}
{% if interface.wifi.auth == "wep" %}
'auth-alg': <'none'>,
'key-mgmt': <'none'>
{% elif interface.wifi.auth == "wpa-psk" %}

View File

@ -22,7 +22,7 @@ class AuthMethod(str, Enum):
"""Authentication method."""
OPEN = "open"
WEB = "web"
WEP = "wep"
WPA_PSK = "wpa-psk"

View File

@ -287,8 +287,8 @@ class Interface:
return None
# Authentication
if inet.settings.wireless_security.key_mgmt == "none":
auth = AuthMethod.WEB
if inet.settings.wireless_security.auth_alg == "none":
auth = AuthMethod.WEP
elif inet.settings.wireless_security.key_mgmt == "wpa-psk":
auth = AuthMethod.WPA_PSK
else:

View File

@ -124,7 +124,7 @@ async def test_interface_update_payload_wireless_web(coresys):
interface.type = InterfaceType.WIRELESS
interface.wifi = WifiConfig(
WifiMode.INFRASTRUCTURE, "Test", AuthMethod.WEB, "password", 0
WifiMode.INFRASTRUCTURE, "Test", AuthMethod.WEP, "password", 0
)
data = interface_update_payload(interface)