diff options
author | Christian Breunig <christian@breunig.cc> | 2023-03-31 16:16:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-31 16:16:08 +0200 |
commit | 11ace86f58261908f1ab15366b73aeddb14745c9 (patch) | |
tree | 9b76855c810d1a6600e2c8a3796bddafebb11133 /interface-definitions/include | |
parent | d98b70aead175809f9b14b9f16779481bbde0877 (diff) | |
parent | c41af9698abaeb1dc656933570c14fc9d75c9ce5 (diff) | |
download | vyos-1x-11ace86f58261908f1ab15366b73aeddb14745c9.tar.gz vyos-1x-11ace86f58261908f1ab15366b73aeddb14745c9.zip |
Merge pull request #1922 from nicolas-fort/T5128
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.in | 4 | ||||
-rw-r--r-- | interface-definitions/include/generic-interface-multi-wildcard.xml.i | 19 |
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 --> |