diff options
author | Andrew Topp <atopp@aus-it.com.au> | 2024-07-30 13:48:18 +1000 |
---|---|---|
committer | Andrew Topp <atopp@aus-it.com.au> | 2024-07-30 13:48:18 +1000 |
commit | adeac78ed6585b16102bd82581b54c75819714b2 (patch) | |
tree | 7111af3bb9bb6047db620f09d64fb261933efe72 /interface-definitions/include/policy/route-common.xml.i | |
parent | ad0acad65051a449432f882edb60246cdfeeb8e5 (diff) | |
download | vyos-1x-adeac78ed6585b16102bd82581b54c75819714b2.tar.gz vyos-1x-adeac78ed6585b16102bd82581b54c75819714b2.zip |
pbr: T6430: Allow forwarding into VRFs by name as well as route table IDs
* PBR 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)
* Added a simple accessor (get_vrf_table_id) for runtime mapping a VRF name
to table ID, based on vyos.ifconfig.interface._set_vrf_ct_zone().
It does not replace that usage, as it deliberately does not handle non-VRF
interface lookups (would fail with a KeyError).
* Added route table ID lookup dict, global route table and VRF table defs
to vyos.defaults. Table ID references have been updated in code touched
by this PR.
* Added a simple smoketest to validate 'set vrf' usage in PBR rules
Diffstat (limited to 'interface-definitions/include/policy/route-common.xml.i')
-rw-r--r-- | interface-definitions/include/policy/route-common.xml.i | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/interface-definitions/include/policy/route-common.xml.i b/interface-definitions/include/policy/route-common.xml.i index 97795601e..203be73e7 100644 --- a/interface-definitions/include/policy/route-common.xml.i +++ b/interface-definitions/include/policy/route-common.xml.i @@ -128,6 +128,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> <leafNode name="tcp-mss"> <properties> <help>TCP Maximum Segment Size</help> |