summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-04-01 16:38:27 +0200
committerGitHub <noreply@github.com>2024-04-01 16:38:27 +0200
commite2bbbce7db2cbb353efe4f3bf09850492599f228 (patch)
treecadb65d1e6f005251b278311544a3016590ebb39
parentadb89e77eb8014b9245ee1f7419e84984f6854c6 (diff)
parent283cc5d8deaf9b8326d3d4648825a8d2d88d90ba (diff)
downloadvyos-1x-e2bbbce7db2cbb353efe4f3bf09850492599f228.tar.gz
vyos-1x-e2bbbce7db2cbb353efe4f3bf09850492599f228.zip
Merge pull request #3227 from vyos/mergify/bp/sagitta/pr-3223
system: T6193: invalid warning "is not a DHCP interface but uses DHCP name-server option" (backport #3223)
-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 })