summaryrefslogtreecommitdiff
path: root/interface-definitions/include
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2023-03-30 12:55:30 +0000
committerNicolas Fort <nicolasfort1988@gmail.com>2023-03-31 12:28:24 +0000
commit599c5405e7ff5b76aa774b8cc97a82fbc053d46c (patch)
tree6cf68e89b33d6eebcc3d1e20c2859329ebaf04b3 /interface-definitions/include
parent623dfc9d87d513bd69e5e6eef9664056dc1a45f1 (diff)
downloadvyos-1x-599c5405e7ff5b76aa774b8cc97a82fbc053d46c.tar.gz
vyos-1x-599c5405e7ff5b76aa774b8cc97a82fbc053d46c.zip
T5128: Policy Route: allow wildcard on interface
Diffstat (limited to 'interface-definitions/include')
-rw-r--r--interface-definitions/include/constraint/interface-name-with-wildcard.xml.in4
-rw-r--r--interface-definitions/include/generic-interface-multi-wildcard.xml.i19
2 files changed, 23 insertions, 0 deletions
diff --git a/interface-definitions/include/constraint/interface-name-with-wildcard.xml.in b/interface-definitions/include/constraint/interface-name-with-wildcard.xml.in
new file mode 100644
index 000000000..09867b380
--- /dev/null
+++ b/interface-definitions/include/constraint/interface-name-with-wildcard.xml.in
@@ -0,0 +1,4 @@
+<!-- include start from constraint/interface-name-with-wildcard.xml.in -->
+<regex>(bond|br|dum|en|ersp|eth|gnv|ifb|lan|l2tp|l2tpeth|macsec|peth|ppp|pppoe|pptp|sstp|tun|veth|vti|vtun|vxlan|wg|wlan|wwan)([0-9]?)(\*?)(.+)?|lo</regex>
+<validator name="file-path --lookup-path /sys/class/net --directory"/>
+<!-- include end -->
diff --git a/interface-definitions/include/generic-interface-multi-wildcard.xml.i b/interface-definitions/include/generic-interface-multi-wildcard.xml.i
new file mode 100644
index 000000000..354841a85
--- /dev/null
+++ b/interface-definitions/include/generic-interface-multi-wildcard.xml.i
@@ -0,0 +1,19 @@
+
+<!-- include start from generic-interface-multi-wildcard.xml.i -->
+<leafNode name="interface">
+ <properties>
+ <help>Interface name to apply policy route configuration</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Interface name</description>
+ </valueHelp>
+ <constraint>
+ #include <include/constraint/interface-name-with-wildcard.xml.in>
+ </constraint>
+ <multi/>
+ </properties>
+</leafNode>
+<!-- include end -->