summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-05 08:47:54 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-09-19 07:00:31 +0000
commitb76a5c94cfeb1a7bad8ac5c818ed3065a4d32210 (patch)
tree4cc2a37f8a4d390ff5b8095cf289169a9182e599
parentc8f116c251e5ab91b518533f595c6efd66b9c392 (diff)
downloadvyos-1x-b76a5c94cfeb1a7bad8ac5c818ed3065a4d32210.tar.gz
vyos-1x-b76a5c94cfeb1a7bad8ac5c818ed3065a4d32210.zip
wireless: T6496: use mac-address validator on BSSID and move it up one CLI levelmergify/bp/circinus/pr-3711
(cherry picked from commit 0c9499c5b3f7cc053c1f29ecf28d679c1a3156e2)
-rw-r--r--data/templates/wifi/wpa_supplicant.conf.j24
-rw-r--r--interface-definitions/interfaces_wireless.xml.in22
2 files changed, 15 insertions, 11 deletions
diff --git a/data/templates/wifi/wpa_supplicant.conf.j2 b/data/templates/wifi/wpa_supplicant.conf.j2
index 8839663e1..04088e1ad 100644
--- a/data/templates/wifi/wpa_supplicant.conf.j2
+++ b/data/templates/wifi/wpa_supplicant.conf.j2
@@ -89,7 +89,7 @@ network={
key_mgmt=NONE
{% endif %}
{% endif %}
-{% if security.bssid is vyos_defined %}
- bssid={{ security.bssid }}
+{% if bssid is vyos_defined %}
+ bssid={{ bssid }}
{% endif %}
}
diff --git a/interface-definitions/interfaces_wireless.xml.in b/interface-definitions/interfaces_wireless.xml.in
index 7016eaa24..474953500 100644
--- a/interface-definitions/interfaces_wireless.xml.in
+++ b/interface-definitions/interfaces_wireless.xml.in
@@ -759,15 +759,6 @@
<help>Wireless security settings</help>
</properties>
<children>
- <leafNode name="bssid">
- <properties>
- <help>Basic Service Set Identifier (BSSID)</help>
- <constraint>
- <regex>([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}</regex>
- </constraint>
- <constraintErrorMessage>Invalid BSSID</constraintErrorMessage>
- </properties>
- </leafNode>
<node name="station-address">
<properties>
<help>Station MAC address based authentication</help>
@@ -986,6 +977,19 @@
<constraintErrorMessage>Invalid SSID</constraintErrorMessage>
</properties>
</leafNode>
+ <leafNode name="bssid">
+ <properties>
+ <help>Basic Service Set Identifier (BSSID) - currently station mode only</help>
+ <valueHelp>
+ <format>macaddr</format>
+ <description>BSSID (MAC) address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="mac-address"/>
+ </constraint>
+ <constraintErrorMessage>Invalid BSSID</constraintErrorMessage>
+ </properties>
+ </leafNode>
<leafNode name="type">
<properties>
<help>Wireless device type for this interface</help>