summaryrefslogtreecommitdiff
path: root/interface-definitions/include
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-24 21:51:10 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-24 21:53:54 +0100
commit9bcd5adf878dfa9f5c621f8b0043ef7f94cdb4b1 (patch)
treea6a496067d6d4906805cb76232921a513ce898e8 /interface-definitions/include
parentc85615ad50799fd0bedbff2e9b7b1831170290f9 (diff)
downloadvyos-1x-9bcd5adf878dfa9f5c621f8b0043ef7f94cdb4b1.tar.gz
vyos-1x-9bcd5adf878dfa9f5c621f8b0043ef7f94cdb4b1.zip
route: static: T2450: add missing "dhcp-interface" route option
As thought in the beginning the dhcp-interface route option can not be superseeded by the interface option. When a route is installed for a DHCP interface, that interface is usually a broadcast interface which can not be used for plain interface-based routes. The old Vyatta logic was migrated to Python where the current received next-hop address from the DHCP interface is installed as next-hop address.
Diffstat (limited to 'interface-definitions/include')
-rw-r--r--interface-definitions/include/static-route.xml.i15
1 files changed, 15 insertions, 0 deletions
diff --git a/interface-definitions/include/static-route.xml.i b/interface-definitions/include/static-route.xml.i
index 386582e09..21fcbcd3f 100644
--- a/interface-definitions/include/static-route.xml.i
+++ b/interface-definitions/include/static-route.xml.i
@@ -31,6 +31,21 @@
</leafNode>
</children>
</node>
+ <leafNode name="dhcp-interface">
+ <properties>
+ <help>DHCP interface supplying next-hop IP address</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>DHCP interface name</description>
+ </valueHelp>
+ <constraint>
+ <validator name="interface-name"/>
+ </constraint>
+ </properties>
+ </leafNode>
<tagNode name="interface">
<properties>
<help>Next-hop IPv4 router interface</help>