diff options
author | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2020-03-06 08:46:25 +0000 |
---|---|---|
committer | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2020-03-06 08:46:25 +0000 |
commit | d5a0324a279126964905877d175362539303ecac (patch) | |
tree | d449c96e0ee5b5ce89f840f420b9c6ee89c007a7 | |
parent | d49f5f38337a523c07584665e23c1fabcc960a77 (diff) | |
download | vyos-1x-d5a0324a279126964905877d175362539303ecac.tar.gz vyos-1x-d5a0324a279126964905877d175362539303ecac.zip |
wireless: T2105: Add check interface state
-rwxr-xr-x | src/conf_mode/interfaces-wireless.py | 9 |
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) |