summaryrefslogtreecommitdiff
path: root/interface-definitions/policy-local-route.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-20 16:53:52 +0100
committerGitHub <noreply@github.com>2020-11-20 16:53:52 +0100
commit8bc6775a692e07b085a1a8e51edbf25f0c1f735c (patch)
tree0336f23a28bbcee6a28a9e1d83d7d4bc771e7207 /interface-definitions/policy-local-route.xml.in
parent7fce006670bf359459020798aed7f6b4dd6d5f6b (diff)
parent7606fa6081e2f6d76982056ca93003e6c5dbd685 (diff)
downloadvyos-1x-8bc6775a692e07b085a1a8e51edbf25f0c1f735c.tar.gz
vyos-1x-8bc6775a692e07b085a1a8e51edbf25f0c1f735c.zip
Merge pull request #614 from sever-sever/T439
policy-conf: T439: Add policy local-route PBR
Diffstat (limited to 'interface-definitions/policy-local-route.xml.in')
-rw-r--r--interface-definitions/policy-local-route.xml.in67
1 files changed, 67 insertions, 0 deletions
diff --git a/interface-definitions/policy-local-route.xml.in b/interface-definitions/policy-local-route.xml.in
new file mode 100644
index 000000000..5536c71c8
--- /dev/null
+++ b/interface-definitions/policy-local-route.xml.in
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<!-- Policy local-route -->
+<interfaceDefinition>
+ <node name="policy">
+ <children>
+ <node name="local-route" owner="${vyos_conf_scripts_dir}/policy-local-route.py">
+ <properties>
+ <help>IPv4 policy route of local traffic</help>
+ </properties>
+ <children>
+ <tagNode name="rule">
+ <properties>
+ <help>Policy local-route rule set number</help>
+ <valueHelp>
+ <!-- table main with prio 32766 -->
+ <format>&lt;1-32765&gt;</format>
+ <description>Local-route rule number (1-219)</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-32765"/>
+ </constraint>
+ </properties>
+ <children>
+ <node name="set">
+ <properties>
+ <help>Packet modifications</help>
+ </properties>
+ <children>
+ <leafNode name="table">
+ <properties>
+ <help>Routing table to forward packet with</help>
+ <valueHelp>
+ <format>&lt;1-200&gt;</format>
+ <description>Table number</description>
+ </valueHelp>
+ <completionHelp>
+ <list>main</list>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="source">
+ <properties>
+ <help>Source address or prefix</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Address to match against</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>Prefix to match against</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ <validator name="ip-prefix"/>
+ </constraint>
+ <multi/>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>