NotifyIpInterfaceChange function (netioapi.h) does not notify on manual DNS changes

Brad House 0 Reputation points
2024-06-05T16:21:55.43+00:00

I work on the c-ares open source asynchronous DNS library (https://c-ares.org) and we have recently added automatic configuration reloading when we detect a network configuration change has occurred.

We get notifications properly when network interfaces go up or down, or IP addresses change (e.g. DHCP), but we aren't getting notifications for a user manually changing a DNS server via Control Panel -> Network and Internet -> Network Connections, then right click on an interface and go to properties then modify the DNS server in "Internet Protocol Version 4 (TCP/IPv4)" or "Internet Protocol Version 6 (TCP/IPv6)".

We used NotifyIpInterfaceChange() for this (https://video2.skills-academy.com/en-us/windows/win32/api/netioapi/nf-netioapi-notifyipinterfacechange), which the documentation seems to indicate since we made a change to the interface we should be notified, however no notification is sent. We would expect to get a MibParameterNotification.

We also tried using NotifyUnicastIpAddressChange() but that didn't notify on that condition either.

This was tested on an up-to-date Windows 11 development machine. I would consider this a bug in NotifyIpInterfaceChange() since it doesn't match the description in the documentation.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,993 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,492 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,608 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 12,151 Reputation points Microsoft Vendor
    2024-06-11T06:03:37.63+00:00

    Hello @Brad House,

    Where do we go from here?

    If the issue has a big impact on you, you can open a Windows SDK incident at https://developer.microsoft.com/en-us/windows/support/?tabs=Contact-us so that our engineer can work with you closely and please choose the 'Networking Development - Internet Protocol Helper (IP Helper) API' for this issue. In-addition, if the support engineer determines that the issue is the result of a bug the service request will be a no-charge case and you won't be charged.