diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-03-22 15:39:40 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-03-22 15:42:21 +0100 |
commit | 5f7ca76cb46b86a6f9adcbebe995a54972fa5abf (patch) | |
tree | d1dd8d4ffdbaf3079c770538b84f399baaab0640 /src/conf_mode/interfaces-wireless.py | |
parent | ca7652e66f23bff6dc5a7e03fb44370191304b6f (diff) | |
download | vyos-1x-5f7ca76cb46b86a6f9adcbebe995a54972fa5abf.tar.gz vyos-1x-5f7ca76cb46b86a6f9adcbebe995a54972fa5abf.zip |
wireless: T1627: add validator on physical-interface
A physical (phy) interface is mandatory for WiFi to work.
Diffstat (limited to 'src/conf_mode/interfaces-wireless.py')
-rwxr-xr-x | src/conf_mode/interfaces-wireless.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-wireless.py b/src/conf_mode/interfaces-wireless.py index 40ee2b418..6528e57f1 100755 --- a/src/conf_mode/interfaces-wireless.py +++ b/src/conf_mode/interfaces-wireless.py @@ -1288,6 +1288,9 @@ def verify(wifi): if wifi['type'] != 'monitor' and not wifi['ssid']: raise ConfigError('SSID must be set for {}'.format(wifi['intf'])) + if not wifi['phy']: + raise ConfigError('You must specify physical-device') + if wifi['type'] == 'access-point': c = Config() if not c.exists('system wifi-regulatory-domain'): |