summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-22 15:39:40 +0100
committerChristian Poessinger <christian@poessinger.com>2020-03-22 15:42:21 +0100
commit5f7ca76cb46b86a6f9adcbebe995a54972fa5abf (patch)
treed1dd8d4ffdbaf3079c770538b84f399baaab0640
parentca7652e66f23bff6dc5a7e03fb44370191304b6f (diff)
downloadvyos-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.
-rwxr-xr-xsrc/conf_mode/interfaces-wireless.py3
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'):