diff options
author | Andrew Topp <andrewt@telekinetica.net> | 2024-09-04 04:09:46 +1000 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-10-07 17:15:58 +0200 |
commit | 051cb6fbe2a9e4b8008bf21cec33eb2b8385305d (patch) | |
tree | 67613c9f57edc7d5c75a1d57f8f05b50377223ca /interface-definitions | |
parent | 2f554aee334c8e52f1a22ea16acf9479d9812ea6 (diff) | |
download | vyos-1x-051cb6fbe2a9e4b8008bf21cec33eb2b8385305d.tar.gz vyos-1x-051cb6fbe2a9e4b8008bf21cec33eb2b8385305d.zip |
pbr: T6430: Local IP rules routing into VRFs by name
* This is the `policy local-route*` part of T6430, manipulating ip rules,
another PR covers firewall-backed `policy route*` for similar functionality
* Local PBR (policy local-route*) can only target table IDs up to 200 and
the previous PR to extend the range was rejected
* PBR with this PR can now also target VRFs directly by name, working around
targeting problems for VRF table IDs outside the overlapping 100-200 range
* Validation ensures rules can't target both a table ID and a VRF name
(internally they are handled the same)
* Relocated TestPolicyRoute.verify_rules() into VyOSUnitTestSHIM.TestCase,
extended to allow lookups in other address families (IPv6 in the new tests).
verify_rules() is used by original pbr and new lpbr smoketests in this PR.
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/policy_local-route.xml.in | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/interface-definitions/policy_local-route.xml.in b/interface-definitions/policy_local-route.xml.in index 7a019154a..5235a668a 100644 --- a/interface-definitions/policy_local-route.xml.in +++ b/interface-definitions/policy_local-route.xml.in @@ -39,6 +39,24 @@ </completionHelp> </properties> </leafNode> + <leafNode name="vrf"> + <properties> + <help>VRF to forward packet with</help> + <valueHelp> + <format>txt</format> + <description>VRF instance name</description> + </valueHelp> + <valueHelp> + <format>default</format> + <description>Forward into default global VRF</description> + </valueHelp> + <completionHelp> + <list>default</list> + <path>vrf name</path> + </completionHelp> + #include <include/constraint/vrf.xml.i> + </properties> + </leafNode> </children> </node> <leafNode name="fwmark"> @@ -113,6 +131,24 @@ </completionHelp> </properties> </leafNode> + <leafNode name="vrf"> + <properties> + <help>VRF to forward packet with</help> + <valueHelp> + <format>txt</format> + <description>VRF instance name</description> + </valueHelp> + <valueHelp> + <format>default</format> + <description>Forward into default global VRF</description> + </valueHelp> + <completionHelp> + <list>default</list> + <path>vrf name</path> + </completionHelp> + #include <include/constraint/vrf.xml.i> + </properties> + </leafNode> </children> </node> <leafNode name="fwmark"> |