Code Review Request: 7158636: InterfaceAddress.getBroadcast() returns invalid broadcast address on WLAN

Chris Hegarty chris.hegarty at oracle.com
Tue Apr 17 11:56:59 PDT 2012


On 17/04/12 19:47, Kurchi Hazra wrote:
> Hi,
>
> In Windows Vista and later, InterfaceAddress.getBroadcast() returns
> 0.0.0.0 , since these platforms return IF_TYPE_IEEE80211 instead of
> MIB_IF_TYPE_ETHERNET for wireless interface type now. The fix is to
> handle IF_TYPE_IEEE80211 in the relevant switch
> statement. While doing this, I also updated some other parts of the code
> in the same file that depended on the value of the wireless interface type.
>
> Although I have defined IF_TYPE_IEEE80211 in NetworkInterface.c, I am
> not sure if it is better to put it in NetworkInterface.h instead.

Right, probably better in the .h file. Otherwise, looks fine.

-Chris.

>
> Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7158636
> Webrev: http://cr.openjdk.java.net/~khazra/7158636/webrev.00/
>
> Thanks,
> Kurchi
>



More information about the net-dev mailing list