Skip to content

Commit

Permalink
[openwrt-wireless] Made "encryption none" explicit
Browse files Browse the repository at this point in the history
Implements and closes openwisp#113
  • Loading branch information
R9295 committed Aug 7, 2018
1 parent 747b2fe commit 685d1f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion netjsonconfig/backends/openwrt/converters/wireless.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __intermediate_encryption(self, wireless):
}
# if encryption disabled return empty dict
if not encryption or disabled or encryption['protocol'] == 'none':
return {}
return {'encryption':'none'}
# otherwise configure encryption
uci = encryption.copy()
for option in ['protocol', 'key', 'cipher', 'disabled']:
Expand Down
2 changes: 2 additions & 0 deletions tests/openwrt/test_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ def test_encryption_disabled(self):
config wifi-iface 'wifi_wlan0'
option device 'radio0'
option encryption 'none'
option ifname 'wlan0'
option mode 'ap'
option network 'wlan0'
Expand Down Expand Up @@ -498,6 +499,7 @@ def test_no_encryption(self):
config wifi-iface 'wifi_wlan0'
option device 'radio0'
option encryption 'none'
option ifname 'wlan0'
option mode 'ap'
option network 'wlan0'
Expand Down

0 comments on commit 685d1f5

Please sign in to comment.