summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/interfaces-bonding.xml.in2
-rw-r--r--interface-definitions/interfaces-bridge.xml.in4
-rw-r--r--interface-definitions/interfaces-dummy.xml.in2
-rw-r--r--interface-definitions/interfaces-ethernet.xml.in2
-rw-r--r--interface-definitions/interfaces-geneve.xml.in2
-rw-r--r--interface-definitions/interfaces-l2tpv3.xml.in4
-rw-r--r--interface-definitions/interfaces-loopback.xml.in2
-rw-r--r--interface-definitions/interfaces-openvpn.xml.in2
-rw-r--r--interface-definitions/interfaces-pppoe.xml.in2
-rw-r--r--interface-definitions/interfaces-pseudo-ethernet.xml.in2
-rw-r--r--interface-definitions/interfaces-tunnel.xml.in2
-rw-r--r--interface-definitions/interfaces-vxlan.xml.in2
-rw-r--r--interface-definitions/interfaces-wireguard.xml.in2
-rw-r--r--interface-definitions/interfaces-wireless.xml.in2
-rw-r--r--interface-definitions/interfaces-wirelessmodem.xml.in3
-rw-r--r--interface-definitions/vrf.xml.in6
16 files changed, 21 insertions, 20 deletions
diff --git a/interface-definitions/interfaces-bonding.xml.in b/interface-definitions/interfaces-bonding.xml.in
index 166f23285..07a6abd30 100644
--- a/interface-definitions/interfaces-bonding.xml.in
+++ b/interface-definitions/interfaces-bonding.xml.in
@@ -7,7 +7,7 @@
<help>Bonding Interface/Link Aggregation</help>
<priority>320</priority>
<constraint>
- <regex>bond[0-9]+$</regex>
+ <regex>^bond[0-9]+$</regex>
</constraint>
<constraintErrorMessage>Bonding interface must be named bondN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-bridge.xml.in b/interface-definitions/interfaces-bridge.xml.in
index f41110a3f..818bc9c0e 100644
--- a/interface-definitions/interfaces-bridge.xml.in
+++ b/interface-definitions/interfaces-bridge.xml.in
@@ -5,9 +5,9 @@
<tagNode name="bridge" owner="${vyos_conf_scripts_dir}/interfaces-bridge.py">
<properties>
<help>Bridge Interface</help>
- <priority>470</priority>
+ <priority>489</priority>
<constraint>
- <regex>br[0-9]+$</regex>
+ <regex>^br[0-9]+$</regex>
</constraint>
<constraintErrorMessage>Bridge interface must be named brN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-dummy.xml.in b/interface-definitions/interfaces-dummy.xml.in
index 5229e602a..135adfc10 100644
--- a/interface-definitions/interfaces-dummy.xml.in
+++ b/interface-definitions/interfaces-dummy.xml.in
@@ -7,7 +7,7 @@
<help>Dummy Interface</help>
<priority>300</priority>
<constraint>
- <regex>dum[0-9]+$</regex>
+ <regex>^dum[0-9]+$</regex>
</constraint>
<constraintErrorMessage>Dummy interface must be named dumN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-ethernet.xml.in b/interface-definitions/interfaces-ethernet.xml.in
index 2b461cfaa..f8ec26d04 100644
--- a/interface-definitions/interfaces-ethernet.xml.in
+++ b/interface-definitions/interfaces-ethernet.xml.in
@@ -7,7 +7,7 @@
<help>Ethernet Interface</help>
<priority>318</priority>
<constraint>
- <regex>((eth|lan)[0-9]+|(eno|ens|enp|enx).+)$</regex>
+ <regex>^((eth|lan)[0-9]+|(eno|ens|enp|enx).+)$</regex>
</constraint>
<constraintErrorMessage>Invalid Ethernet interface name</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-geneve.xml.in b/interface-definitions/interfaces-geneve.xml.in
index a6406ffc9..31a3ebb7a 100644
--- a/interface-definitions/interfaces-geneve.xml.in
+++ b/interface-definitions/interfaces-geneve.xml.in
@@ -7,7 +7,7 @@
<help>Generic Network Virtualization Encapsulation (GENEVE) Interface</help>
<priority>460</priority>
<constraint>
- <regex>gnv[0-9]+$</regex>
+ <regex>^gnv[0-9]+$</regex>
</constraint>
<constraintErrorMessage>GENEVE interface must be named gnvN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-l2tpv3.xml.in b/interface-definitions/interfaces-l2tpv3.xml.in
index 161a37df8..30dd9b604 100644
--- a/interface-definitions/interfaces-l2tpv3.xml.in
+++ b/interface-definitions/interfaces-l2tpv3.xml.in
@@ -5,9 +5,9 @@
<tagNode name="l2tpv3" owner="${vyos_conf_scripts_dir}/interfaces-l2tpv3.py">
<properties>
<help>Layer 2 Tunnel Protocol Version 3 (L2TPv3) Interface</help>
- <priority>800</priority>
+ <priority>485</priority>
<constraint>
- <regex>l2tpeth[0-9]+$</regex>
+ <regex>^l2tpeth[0-9]+$</regex>
</constraint>
<constraintErrorMessage>L2TPv3 interface must be named l2tpethN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-loopback.xml.in b/interface-definitions/interfaces-loopback.xml.in
index ddbfad763..97d5bab90 100644
--- a/interface-definitions/interfaces-loopback.xml.in
+++ b/interface-definitions/interfaces-loopback.xml.in
@@ -7,7 +7,7 @@
<help>Loopback Interface</help>
<priority>300</priority>
<constraint>
- <regex>lo$</regex>
+ <regex>^lo$</regex>
</constraint>
<constraintErrorMessage>Loopback interface must be named lo</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-openvpn.xml.in b/interface-definitions/interfaces-openvpn.xml.in
index cd5b5f29e..92bac3fab 100644
--- a/interface-definitions/interfaces-openvpn.xml.in
+++ b/interface-definitions/interfaces-openvpn.xml.in
@@ -7,7 +7,7 @@
<help>OpenVPN Tunnel Interface</help>
<priority>460</priority>
<constraint>
- <regex>vtun[0-9]+$</regex>
+ <regex>^vtun[0-9]+$</regex>
</constraint>
<constraintErrorMessage>OpenVPN tunnel interface must be named vtunN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-pppoe.xml.in b/interface-definitions/interfaces-pppoe.xml.in
index bbaff5f04..bc7995918 100644
--- a/interface-definitions/interfaces-pppoe.xml.in
+++ b/interface-definitions/interfaces-pppoe.xml.in
@@ -7,7 +7,7 @@
<help>Point-to-Point Protocol over Ethernet (PPPoE)</help>
<priority>321</priority>
<constraint>
- <regex>pppoe[0-9]+$</regex>
+ <regex>^pppoe[0-9]+$</regex>
<validator name="numeric" argument="--range 1-99"/>
</constraint>
<constraintErrorMessage>PPPoE interface must be named pppoeN</constraintErrorMessage>
diff --git a/interface-definitions/interfaces-pseudo-ethernet.xml.in b/interface-definitions/interfaces-pseudo-ethernet.xml.in
index 772056bd2..0c56e4e4b 100644
--- a/interface-definitions/interfaces-pseudo-ethernet.xml.in
+++ b/interface-definitions/interfaces-pseudo-ethernet.xml.in
@@ -7,7 +7,7 @@
<help>Pseudo Ethernet</help>
<priority>319</priority>
<constraint>
- <regex>peth[0-9]+$</regex>
+ <regex>^peth[0-9]+$</regex>
</constraint>
<constraintErrorMessage>Pseudo Ethernet interface must be named pethN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-tunnel.xml.in b/interface-definitions/interfaces-tunnel.xml.in
index fe4a81f92..3ba82067f 100644
--- a/interface-definitions/interfaces-tunnel.xml.in
+++ b/interface-definitions/interfaces-tunnel.xml.in
@@ -7,7 +7,7 @@
<help>Tunnel interface</help>
<priority>380</priority>
<constraint>
- <regex>tun[0-9]+$</regex>
+ <regex>^tun[0-9]+$</regex>
</constraint>
<constraintErrorMessage>tunnel interface must be named tunN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-vxlan.xml.in b/interface-definitions/interfaces-vxlan.xml.in
index 70c45d1fd..3108817b3 100644
--- a/interface-definitions/interfaces-vxlan.xml.in
+++ b/interface-definitions/interfaces-vxlan.xml.in
@@ -7,7 +7,7 @@
<help>Virtual Extensible LAN (VXLAN) Interface</help>
<priority>460</priority>
<constraint>
- <regex>vxlan[0-9]+$</regex>
+ <regex>^vxlan[0-9]+$</regex>
</constraint>
<constraintErrorMessage>VXLAN interface must be named vxlanN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-wireguard.xml.in b/interface-definitions/interfaces-wireguard.xml.in
index dd4a73efd..d461156b3 100644
--- a/interface-definitions/interfaces-wireguard.xml.in
+++ b/interface-definitions/interfaces-wireguard.xml.in
@@ -7,7 +7,7 @@
<help>WireGuard Interface</help>
<priority>459</priority>
<constraint>
- <regex>wg[0-9]+$</regex>
+ <regex>^wg[0-9]+$</regex>
</constraint>
<constraintErrorMessage>WireGuard interface must be named wgN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-wireless.xml.in b/interface-definitions/interfaces-wireless.xml.in
index 2c224987e..12736510b 100644
--- a/interface-definitions/interfaces-wireless.xml.in
+++ b/interface-definitions/interfaces-wireless.xml.in
@@ -7,7 +7,7 @@
<help>Wireless (WiFi/WLAN) Network Interface</help>
<priority>400</priority>
<constraint>
- <regex>wlan[0-9]+$</regex>
+ <regex>^wlan[0-9]+$</regex>
</constraint>
<constraintErrorMessage>Wireless interface must be named wlanN</constraintErrorMessage>
<valueHelp>
diff --git a/interface-definitions/interfaces-wirelessmodem.xml.in b/interface-definitions/interfaces-wirelessmodem.xml.in
index cea8f4029..2ec9205e0 100644
--- a/interface-definitions/interfaces-wirelessmodem.xml.in
+++ b/interface-definitions/interfaces-wirelessmodem.xml.in
@@ -7,7 +7,7 @@
<help>Wireless Modem (WWAN) Interface</help>
<priority>350</priority>
<constraint>
- <regex>wlm[0-9]+$</regex>
+ <regex>^wlm[0-9]+$</regex>
</constraint>
<constraintErrorMessage>Wireless Modem interface must be named wlmN</constraintErrorMessage>
<valueHelp>
@@ -43,6 +43,7 @@
</node>
#include <include/interface-description.xml.i>
#include <include/interface-disable.xml.i>
+ #include <include/interface-vrf.xml.i>
<leafNode name="device">
<properties>
<help>System device name (default: ttyUSB0)</help>
diff --git a/interface-definitions/vrf.xml.in b/interface-definitions/vrf.xml.in
index 76748e5ae..7c75bf824 100644
--- a/interface-definitions/vrf.xml.in
+++ b/interface-definitions/vrf.xml.in
@@ -17,9 +17,9 @@
<properties>
<help>VRF instance name</help>
<constraint>
- <regex>[^/\s]{1,16}$</regex>
+ <validator name="vrf-name"/>
</constraint>
- <constraintErrorMessage>VRF instance name must be 16 characters or less</constraintErrorMessage>
+ <constraintErrorMessage>VRF instance name must be 16 characters or less and can not\nbe named as regular network interfaces</constraintErrorMessage>
<valueHelp>
<format>name</format>
<description>Instance name</description>
@@ -44,4 +44,4 @@
</tagNode>
</children>
</node>
-</interfaceDefinition> \ No newline at end of file
+</interfaceDefinition>