Patch for NetworkInterface.c to fix incorrect returned values for broadcast address and net mask on Linux

Doychin Bondzhev doychin at dsoft-bg.com
Wed Feb 11 07:34:59 UTC 2015


Hi,

Anyone who can look into this?

Thanks in advance

On 20.1.2015 г. 22:20 ч., Doychin Bondzhev wrote:
> Hi,
>
> Please review this patch
> http://dmitryalexandrov.net/~bgjug/network-interface/webrev.00/
>
> It fixes the problem described in this thread
>
> http://mail.openjdk.java.net/pipermail/net-dev/2014-December/008806.html
>
> Also in order to setup dummy interface with test values you can use
> these commands:
>
> ip link add dummy0 type dummy
>
> ip addr add 10.5.5.1/28 <http://10.5.5.1/28> brd 10.5.5.15 dev dummy0
> ip addr add 10.6.0.1/23 <http://10.6.0.1/23> brd 10.6.1.255 dev dummy0
> ip addr add 10.7.0.1/25 <http://10.7.0.1/25> brd 10.7.0.127 dev dummy0
>
> The output from NetworkInterface test
> test/java/net/NetworkInterface/NetParamsTest.java for this interface is:
>
> dummy0 :
>      Status: DOWN
>      Hardware Address: 56:ffffffd4:fffffffd:ffffffc2:ffffffec:ffffff82:
>      Loopback: false
>      Point to Point: false
>      Virtual: false
>      Multicast: false
>      MTU: 1500
>      Bindings:
>          /10.7.0.1/25 <http://10.7.0.1/25> [/10.7.0.127 <http://10.7.0.127>]
>          /10.6.0.1/23 <http://10.6.0.1/23> [/10.6.1.255 <http://10.6.1.255>]
>          /10.5.5.1/28 <http://10.5.5.1/28> [/10.5.5.15 <http://10.5.5.15>]
>
> This is the output from Java 1.8.0_25. Same output is produced with
> existing version of NetworkInterface.c in JDK 9
>
> dummy0 :
>      Status: DOWN
>      Hardware Address: 56:ffffffd4:fffffffd:ffffffc2:ffffffec:ffffff82:
>      Loopback: false
>      Point to Point: false
>      Virtual: false
>      Multicast: false
>      MTU: 1500
>      Bindings:
>          /10.7.0.1/28 <http://10.7.0.1/28> [/10.5.5.15 <http://10.5.5.15>]
>          /10.6.0.1/28 <http://10.6.0.1/28> [/10.5.5.15 <http://10.5.5.15>]
>          /10.5.5.1/28 <http://10.5.5.1/28> [/10.5.5.15 <http://10.5.5.15>]
>
>


-- 
Doychin Bondzhev
dSoft-Bulgaria Ltd.
PowerPro - billing & provisioning solution for Service providers
PowerStor - Warehouse & POS
http://www.dsoft-bg.com/
Mobile: +359888243116
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doychin.vcf
Type: text/x-vcard
Size: 268 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20150211/4e8b2016/doychin.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5924 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20150211/4e8b2016/smime.p7s>


More information about the net-dev mailing list