diff options
| author | Andreas Oberritter <obi@opendreambox.org> | 2011-03-14 19:05:12 +0100 |
|---|---|---|
| committer | Andreas Oberritter <obi@opendreambox.org> | 2011-03-14 19:08:02 +0100 |
| commit | 74ef8cacc65911f9a64fef9f0fd9607dd178f64c (patch) | |
| tree | 9e99ac844d078dc39e558591bff8ae9d6b6a9f56 /lib/python | |
| parent | 06a1a623534d89b1fd336dbf158dd2cee4425f13 (diff) | |
| download | enigma2-74ef8cacc65911f9a64fef9f0fd9607dd178f64c.tar.gz enigma2-74ef8cacc65911f9a64fef9f0fd9607dd178f64c.zip | |
WLAN: fix inversed logic for WPA2 vs. WPA/WPA2
Diffstat (limited to 'lib/python')
| -rwxr-xr-x | lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py b/lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py index baefd435..e629a67d 100755 --- a/lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py +++ b/lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py @@ -265,7 +265,7 @@ class wpaSupplicant: fp.write('\tssid="'+essid+'"\n') fp.write('\tscan_ssid=0\n') if encrypted: - if encryption == 'WPA' or encryption == 'WPA2' or encryption == 'WPA/WPA2' : + if encryption in ('WPA', 'WPA2', 'WPA/WPA2'): fp.write('\tkey_mgmt=WPA-PSK\n') if encryption == 'WPA': @@ -273,15 +273,14 @@ class wpaSupplicant: fp.write('\tpairwise=TKIP\n') fp.write('\tgroup=TKIP\n') elif encryption == 'WPA2': + fp.write('\tproto=RSN\n') + fp.write('\tpairwise=CCMP\n') + fp.write('\tgroup=CCMP\n') + else: fp.write('\tproto=WPA RSN\n') fp.write('\tpairwise=CCMP TKIP\n') - fp.write('\tgroup=CCMP TKIP\n') - else: - fp.write('\tproto=WPA WPA2\n') - fp.write('\tpairwise=CCMP\n') - fp.write('\tgroup=TKIP\n') + fp.write('\tgroup=CCMP TKIP\n') fp.write('\tpsk="'+psk+'"\n') - elif encryption == 'WEP': fp.write('\tkey_mgmt=NONE\n') if wepkeytype == 'ASCII': |
