summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-01 13:17:26 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-04-01 14:33:35 +0000
commit283cc5d8deaf9b8326d3d4648825a8d2d88d90ba (patch)
tree32747bcdfd91894d00d0248970c98656050aaf57
parent5e5bb5a40cbd3fad92f0d88c36f47b9b5fd41347 (diff)
downloadvyos-1x-283cc5d8deaf9b8326d3d4648825a8d2d88d90ba.tar.gz
vyos-1x-283cc5d8deaf9b8326d3d4648825a8d2d88d90ba.zip
system: T6193: invalid warning "is not a DHCP interface but uses DHCP name-server option"
This fixes an invalid warning when using a DHCP VLAN interface to retrieve the system nameserver to be used. VLAN CLI config is not properly expanded leading to a false warning: [ system name-server eth1.10 ] WARNING: "eth1.10" is not a DHCP interface but uses DHCP name-server option! (cherry picked from commit 61e70c5500ad5b0a9d25bdee28d982644bad6461)
-rwxr-xr-xsrc/conf_mode/system_host-name.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/system_host-name.py b/src/conf_mode/system_host-name.py
index 6204cf247..8975cadb6 100755
--- a/src/conf_mode/system_host-name.py
+++ b/src/conf_mode/system_host-name.py
@@ -71,9 +71,9 @@ def get_config(config=None):
hosts['nameserver'].append(ns)
else:
tmp = ''
- if_type = Section.section(ns)
- if conf.exists(['interfaces', if_type, ns, 'address']):
- tmp = conf.return_values(['interfaces', if_type, ns, 'address'])
+ config_path = Section.get_config_path(ns)
+ if conf.exists(['interfaces', config_path, 'address']):
+ tmp = conf.return_values(['interfaces', config_path, 'address'])
hosts['nameservers_dhcp_interfaces'].update({ ns : tmp })