summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-06 10:17:34 +0100
committerGitHub <noreply@github.com>2020-03-06 10:17:34 +0100
commitf1d4cf72cd7211bf5348108f4367274c07cdf27a (patch)
treed449c96e0ee5b5ce89f840f420b9c6ee89c007a7
parentd49f5f38337a523c07584665e23c1fabcc960a77 (diff)
parentd5a0324a279126964905877d175362539303ecac (diff)
downloadvyos-1x-f1d4cf72cd7211bf5348108f4367274c07cdf27a.tar.gz
vyos-1x-f1d4cf72cd7211bf5348108f4367274c07cdf27a.zip
Merge pull request #243 from DmitriyEshenko/1.3-fix-wifi-state
wireless: T2105: Add check interface state
-rwxr-xr-xsrc/conf_mode/interfaces-wireless.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-wireless.py b/src/conf_mode/interfaces-wireless.py
index 5289208d9..2e82c6fc9 100755
--- a/src/conf_mode/interfaces-wireless.py
+++ b/src/conf_mode/interfaces-wireless.py
@@ -1248,6 +1248,9 @@ def get_config():
conf.set_level(cfg_base + ' vif ' + vif)
wifi['vif'].append(vlan_to_dict(conf))
+ # disable interface
+ if conf.exists('disable'):
+ wifi['disable'] = True
# retrieve configured regulatory domain
conf.set_level('system')
@@ -1406,8 +1409,10 @@ def apply(wifi):
# configure ARP ignore
w.set_arp_ignore(wifi['ip_enable_arp_ignore'])
- # enable interface
- if not wifi['disable']:
+ # Enable/Disable interface
+ if wifi['disable']:
+ w.set_state('down')
+ else:
w.set_state('up')
# Configure interface address(es)