[BUG] win_dns_client.get_dns_config interface naming issues.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
In the win_dns_client.get_dns_config is using the wrong wmi field for the interface name.
for all other parts of the module iface.NetConnectionID is used
Setup
currently, win_dns_client.get_dns_config is using iface.Description as the interface name when it should be using iface.NetConnectionID like everything else in this tool.
as an example of the differences in these see. the following code.
PS C:\WINDOWS\system32> $interfaces = Get-WmiObject Win32_NetworkAdapter
PS C:\WINDOWS\system32> $interfaces | foreach {
>> $friendlyname = $_ | Select-Object -ExpandProperty NetConnectionID
>> $name = $_ | Select-Object -ExpandProperty Description
>> "$friendlyname is $name"
>> }
Ethernet 3 is AnchorFree TAP-Windows Adapter V9
Ethernet 2 is TAP-Windows Adapter V9
is Microsoft Kernel Debug Network Adapter
is WAN Miniport (SSTP)
is WAN Miniport (IKEv2)
is WAN Miniport (L2TP)
is WAN Miniport (PPTP)
is WAN Miniport (PPPOE)
is WAN Miniport (IP)
is WAN Miniport (IPv6)
is WAN Miniport (Network Monitor)
is Hyper-V Virtual Switch Extension Adapter
vEthernet (Default Switch) is Hyper-V Virtual Ethernet Adapter
Ethernet is Intel(R) Ethernet Connection (7) I219-V
Wi-Fi is Intel(R) Wireless-AC 9560
is Microsoft Wi-Fi Direct Virtual Adapter
is Microsoft Wi-Fi Direct Virtual Adapter
Bluetooth Network Connection is Bluetooth Device (Personal Area Network)
Steps to Reproduce the behavior
Try and use the same interface id for win_dns_client.get_dns_servers and win_dns_client.get_dns_config when NetConnectionID and Descriptor do not line up.
Expected behavior
consistency.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Desktop:
Salt Version:
Salt: 3001.1
Dependency Versions:
cffi: 1.12.2
cherrypy: 17.4.1
dateutil: 2.8.0
docker-py: Not Installed
gitdb: 2.0.5
gitpython: Not Installed
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: Not Installed
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 1.0.0
mysql-python: Not Installed
pycparser: 2.19
pycrypto: Not Installed
pycryptodome: 3.9.7
pygit2: Not Installed
Python: 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
python-gnupg: 0.4.4
PyYAML: 5.3.1
PyZMQ: 18.0.1
smmap: 2.0.5
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist:
locale: cp1252
machine: AMD64
release: 10
system: Windows
version: 10 10.0.19041 SP0
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the win_dns_client.get_dns_config entry point and compare its interface-name lookup with win_dns_client.get_dns_servers and the other module paths that use iface.NetConnectionID. Reproduce with an interface whose NetConnectionID differs from Description, then verify both functions accept the same interface identifier and return consistent results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100