diff options
author | Nicolas Fort <nicolasfort1988@gmail.com> | 2024-01-08 11:05:56 +0000 |
---|---|---|
committer | Nicolas Fort <nicolasfort1988@gmail.com> | 2024-01-08 11:05:56 +0000 |
commit | 02db800b3aaa4b5c7de5564271c0ea37e895915a (patch) | |
tree | 9cc8ecec56bd40cfa6b0b3ebdaaed16688bc0718 /interface-definitions | |
parent | 48c09cb91079733e4c5517a22b5345ff14d66059 (diff) | |
download | vyos-1x-02db800b3aaa4b5c7de5564271c0ea37e895915a.tar.gz vyos-1x-02db800b3aaa4b5c7de5564271c0ea37e895915a.zip |
T5896: firewall: backport interface validator for firewall rules.
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/include/constraint/interface-name-with-wildcard-and-inverted.xml.i | 4 | ||||
-rw-r--r-- | interface-definitions/include/firewall/match-interface.xml.i | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/interface-definitions/include/constraint/interface-name-with-wildcard-and-inverted.xml.i b/interface-definitions/include/constraint/interface-name-with-wildcard-and-inverted.xml.i deleted file mode 100644 index 6a39041a3..000000000 --- a/interface-definitions/include/constraint/interface-name-with-wildcard-and-inverted.xml.i +++ /dev/null @@ -1,4 +0,0 @@ -<!-- include start from constraint/interface-name-with-wildcard-and-inverted.xml.i --> -<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 -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/match-interface.xml.i b/interface-definitions/include/firewall/match-interface.xml.i index 8be97c3ed..9f720ab37 100644 --- a/interface-definitions/include/firewall/match-interface.xml.i +++ b/interface-definitions/include/firewall/match-interface.xml.i @@ -4,6 +4,7 @@ <help>Match interface</help> <completionHelp> <script>${vyos_completion_dir}/list_interfaces</script> + <path>vrf name</path> </completionHelp> <valueHelp> <format>txt</format> @@ -18,7 +19,8 @@ <description>Inverted interface name to match</description> </valueHelp> <constraint> - #include <include/constraint/interface-name-with-wildcard-and-inverted.xml.i> + <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="vrf-name"/> </constraint> </properties> </leafNode> @@ -38,4 +40,4 @@ </valueHelp> </properties> </leafNode> -<!-- include end -->
\ No newline at end of file +<!-- include end --> |