Skip to content

Commit fe2a797

Browse files
committed
[openwrt-wireless] Made "encryption none" explicit
Implements and closes #113
1 parent 747b2fe commit fe2a797

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

netjsonconfig/backends/openwrt/converters/wireless.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __intermediate_encryption(self, wireless):
8989
}
9090
# if encryption disabled return empty dict
9191
if not encryption or disabled or encryption['protocol'] == 'none':
92-
return {}
92+
return {'encryption': 'none'}
9393
# otherwise configure encryption
9494
uci = encryption.copy()
9595
for option in ['protocol', 'key', 'cipher', 'disabled']:

tests/openwrt/test_encryption.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ def test_encryption_disabled(self):
466466
467467
config wifi-iface 'wifi_wlan0'
468468
option device 'radio0'
469+
option encryption 'none'
469470
option ifname 'wlan0'
470471
option mode 'ap'
471472
option network 'wlan0'
@@ -498,6 +499,7 @@ def test_no_encryption(self):
498499
499500
config wifi-iface 'wifi_wlan0'
500501
option device 'radio0'
502+
option encryption 'none'
501503
option ifname 'wlan0'
502504
option mode 'ap'
503505
option network 'wlan0'

0 commit comments

Comments
 (0)