Skip to content

Commit

Permalink
system: T6193: invalid warning "is not a DHCP interface but uses DHCP…
Browse files Browse the repository at this point in the history
… 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 61e70c5)
  • Loading branch information
c-po authored and mergify[bot] committed Apr 1, 2024
1 parent 5e5bb5a commit 283cc5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/conf_mode/system_host-name.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 })

Expand Down

0 comments on commit 283cc5d

Please sign in to comment.