diff options
author | Christian Breunig <christian@breunig.cc> | 2024-04-01 13:17:26 +0200 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-04-01 14:34:39 +0000 |
commit | 8cabdcfc85c8c86811cfdae2313896ea33ab247f (patch) | |
tree | d02970eab2e4284a1c5b9c25d318792b7feec072 /src | |
parent | 713b2f3702134abd9a34c539019a83d0e354eb22 (diff) | |
download | vyos-1x-8cabdcfc85c8c86811cfdae2313896ea33ab247f.tar.gz vyos-1x-8cabdcfc85c8c86811cfdae2313896ea33ab247f.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)
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/host_name.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 87bad0dc6..1e4667cac 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -70,9 +70,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 }) |