@@ -803,7 +803,7 @@ HRESULT LWIP_SOCKETS_Driver::UpdateAdapterConfiguration( UINT32 interfaceIndex,
803803 }
804804
805805 BOOL fEnableDhcp = (0 != (config->flags & SOCK_NETWORKCONFIGURATION_FLAGS_DHCP));
806- // BOOL fDynamicDns = (0 != (config->flags & SOCK_NETWORKCONFIGURATION_FLAGS_DYNAMIC_DNS));
806+ BOOL fDynamicDns = (0 != (config->flags & SOCK_NETWORKCONFIGURATION_FLAGS_DYNAMIC_DNS));
807807 BOOL fDhcpStarted ;
808808
809809 struct netif *pNetIf = netif_find_interface (g_LWIP_SOCKETS_Driver.m_interfaces [interfaceIndex].m_interfaceNumber );
@@ -814,30 +814,12 @@ HRESULT LWIP_SOCKETS_Driver::UpdateAdapterConfiguration( UINT32 interfaceIndex,
814814
815815 fDhcpStarted = (0 != (pNetIf->flags & NETIF_FLAG_DHCP));
816816
817- // TODO Disable a separate option for dynamic DNS for now.
818817#if LWIP_DNS
819818 // when using DHCP do not use the static settings
820819 if (0 != (updateFlags & SOCK_NETWORKCONFIGURATION_UPDATE_DNS))
821820 {
822- // // if dynamic dns is on, then we will set the corresonding NetIF flag
823- // // resetting dhcp if necessary.
824- // if(fDynamicDns || (config->dnsServer1 == 0 && config->dnsServer2 == 0))
825- // {
826- // if(0 == (pNetIf->flagsExt & NETIF_FLAG_EXT_DYNAMIC_DNS))
827- // {
828- // pNetIf->flagsExt |= NETIF_FLAG_EXT_DYNAMIC_DNS;
829-
830- // // if dhcp is active, we need to reset in order to get the dynamic
831- // // dns
832- // if(fEnableDhcp && fDhcpStarted)
833- // {
834- // dhcp_stop(pNetIf);
835- // dhcp_start(pNetIf);
836- // }
837- // }
838- // }
839- // else
840- // {
821+ if (!fDynamicDns && (config->dnsServer1 != 0 || config->dnsServer2 != 0 ))
822+ {
841823 // user defined DNS addresses
842824 if (config->dnsServer1 != 0 )
843825 {
@@ -851,9 +833,7 @@ HRESULT LWIP_SOCKETS_Driver::UpdateAdapterConfiguration( UINT32 interfaceIndex,
851833
852834 dns_setserver (idx, (struct ip_addr *)&config->dnsServer2 );
853835 }
854-
855- // pNetIf->flagsExt &= ~NETIF_FLAG_EXT_DYNAMIC_DNS;
856- // }
836+ }
857837 }
858838#endif
859839
0 commit comments