JDK-6633549 : (dc) Include-mode filtering of IPv6 sources does not block datagrams on Linux
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-11-23
  • Updated: 2013-06-26
  • Resolved: 2012-08-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Fixed 8 b51Fixed
Description
This bug is for tracking purposes and is believed to be a bug in the Linux IPv6 stack.

The failure duplicates on Ubuntu with 2.6.17-10 kernel and this test;
    test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java 

On this kernel, IPv4 include-mode and exclude-mode filtering works correctly. With IPv6 then exclude-mode filtering works okay, but include-mode doesn't work.


$ java MulticastSendReceiveTests
create channel to INET socket
join 225.4.5.6 @ eth0
Send message from 129.156.232.195 -> group 225.4.5.6
Waiting to receive message
Message received from 129.156.232.195
block 129.156.232.195
Send message from 129.156.232.195 -> group 225.4.5.6
Waiting to receive message
No message received (correct)
unblock 129.156.232.195
Send message from 129.156.232.195 -> group 225.4.5.6
Waiting to receive message
Message received from 129.156.232.195
join 225.4.5.6 @ eth0 only-source 1.2.3.4
Send message from 129.156.232.195 -> group 225.4.5.6
Waiting to receive message
No message received (correct)
join 225.4.5.6 @ eth0 only-source 129.156.232.195
Send message from 129.156.232.195 -> group 225.4.5.6
Waiting to receive message
Message received from 129.156.232.195
create channel to INET6 socket
join ff02:0:0:0:0:0:0:a @ eth0
Send message from fe80:0:0:0:206:5bff:fe75:37c3%2 -> group ff02:0:0:0:0:0:0:a
Waiting to receive message
Message received from fe80:0:0:0:206:5bff:fe75:37c3%2
block fe80:0:0:0:206:5bff:fe75:37c3%2
Send message from fe80:0:0:0:206:5bff:fe75:37c3%2 -> group ff02:0:0:0:0:0:0:a
Waiting to receive message
No message received (correct)
unblock fe80:0:0:0:206:5bff:fe75:37c3%2
Send message from fe80:0:0:0:206:5bff:fe75:37c3%2 -> group ff02:0:0:0:0:0:0:a
Waiting to receive message
Message received from fe80:0:0:0:206:5bff:fe75:37c3%2
join ff02:0:0:0:0:0:0:a @ eth0 only-source fe80:0:0:0:0:0:0:1234
Send message from fe80:0:0:0:206:5bff:fe75:37c3%2 -> group ff02:0:0:0:0:0:0:a
Waiting to receive message
Message received from fe80:0:0:0:206:5bff:fe75:37c3%2
Exception in thread "main" java.lang.RuntimeException: Message not expected
        at MulticastSendReceiveTests.receiveDatagram(MulticastSendReceiveTests.java:101)
        at MulticastSendReceiveTests.test(MulticastSendReceiveTests.java:179)
        at MulticastSendReceiveTests.main(MulticastSendReceiveTests.java:210)

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/jdk/rev/11d5ddc6a6d4
14-08-2012

EVALUATION This appears to be an issue with the definitions in Net.c.
16-08-2010