summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-06-11 09:09:42 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-06-11 22:10:47 +0200
commit0f8beae7426dfc1fdb75c993a505672d9dd2ec0f (patch)
tree649883b986082ebfa49c506a7df1f3924740a990 /interface-definitions
parent7000385c68b5816867650781a5d8a87ce90f52aa (diff)
downloadvyos-1x-0f8beae7426dfc1fdb75c993a505672d9dd2ec0f.tar.gz
vyos-1x-0f8beae7426dfc1fdb75c993a505672d9dd2ec0f.zip
system: T2486: migrate disable-dhcp-nameservers to name-servers-dhcp
The previous implementation only supported disabling DHCP nameservers for all interfaces, and was implemented improperly so it didn't work anyway. This migrates it to name-servers-dhcp <interface>, which allows us to enable just the interfaces we want to use for system DNS, identical in syntax to 'service dns forwarding dhcp <interface>'. The migrator searches through all interfaces that have address 'dhcp(v6)?' and adds them to the name-servers-dhcp list if disable-dhcp-nameservers is not set, else it does nothing.
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/dns-domain-name.xml.in20
1 files changed, 11 insertions, 9 deletions
diff --git a/interface-definitions/dns-domain-name.xml.in b/interface-definitions/dns-domain-name.xml.in
index eeaa5b2c1..3b5843b53 100644
--- a/interface-definitions/dns-domain-name.xml.in
+++ b/interface-definitions/dns-domain-name.xml.in
@@ -5,7 +5,7 @@
<children>
<leafNode name="name-server" owner="${vyos_conf_scripts_dir}/host_name.py">
<properties>
- <help>Domain Name Server (DNS)</help>
+ <help>Domain Name Servers (DNS) used by the system (resolv.conf)</help>
<priority>400</priority>
<valueHelp>
<format>ipv4</format>
@@ -22,6 +22,16 @@
</constraint>
</properties>
</leafNode>
+ <leafNode name="name-servers-dhcp" owner="${vyos_conf_scripts_dir}/host_name.py">
+ <properties>
+ <help>Interfaces whose DHCP client nameservers will be used by the system (resolv.conf)</help>
+ <priority>400</priority>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ <multi/>
+ </properties>
+ </leafNode>
<leafNode name="host-name" owner="${vyos_conf_scripts_dir}/host_name.py">
<properties>
<help>System host name (default: vyos)</help>
@@ -56,20 +66,12 @@
</leafNode>
</children>
</node>
- <leafNode name="disable-dhcp-nameservers" owner="${vyos_conf_scripts_dir}/host_name.py">
- <properties>
- <help>Disable DHCP updates of DNS settings</help>
- <priority>300</priority>
- <valueless/>
- </properties>
- </leafNode>
<node name="static-host-mapping" owner="${vyos_conf_scripts_dir}/host_name.py">
<properties>
<help>Map host names to addresses</help>
<priority>400</priority>
</properties>
<children>
-
<tagNode name="host-name">
<properties>
<help>Host name for static address mapping</help>