[PATCH] iphlpapi: Set DhcpEnabled to TRUE for all interfaces.

Juan Lang juan.lang at gmail.com
Tue Sep 25 10:53:21 CDT 2012


Hi Qian,

> There is a winpcap based network authentication client which check for the DhcpEnabled value, this patch make the app happy and then the app works with André's pcap wrapper [1].
>
> Please let me know if this is acceptable, or we have to correctly implement DhcpEnabled status?

I think this is fine, but you'd want to remove/fix some outdated
comments I wrote at the same time:

 * NOTES
 *  Since GetAdaptersInfo never returns adapters that have DHCP enabled,
 *  this function does nothing.
 *
 * FIXME
 *  Stub, returns ERROR_NOT_SUPPORTED.
 */
DWORD WINAPI IpReleaseAddress(PIP_ADAPTER_INDEX_MAP AdapterInfo)
{
  TRACE("AdapterInfo %p\n", AdapterInfo);
  /* not a stub, never going to support this (and I never mark an adapter as
     DHCP enabled, see GetAdaptersInfo, so this should never get called) */

The same comments are in IpRenewAddress.

Historical reason: when I wrote iphlpapi's first implementation, I had
recently been working on a Windows app that released and renewed IP
addresses on DHCP-enabled interfaces, because Windows at the time was
pretty poor at doing so in response to changes to wireless connection
state. I figured I wouldn't be the only one to have had to work around
this issue, so I didn't want to have to implement IpReleaseAddress and
IpRenewAddress in Wine.

That was almost 10 years ago now, so these reasons no longer apply.
I'm pretty sure the app I wrote isn't in use any longer, and even if
it is, it isn't in use on Wine (I also wrote a Linux version.)

Thanks,
--Juan



More information about the wine-devel mailing list