Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Sep 2014 10:08:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-net@FreeBSD.org
Subject:   [Bug 193246] Bug in multicast bind(), uncovered by Jenkins
Message-ID:  <bug-193246-2472-K4vcLezbJa@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-193246-2472@https.bugs.freebsd.org/bugzilla/>
References:  <bug-193246-2472@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193246

--- Comment #2 from Craig Rodrigues <rodrigc@FreeBSD.org> ---
I did some more analysis and found that this code:


 13253 java     CALL  bind(0x4,0x7fffffbfd7a8,0x1c)
 13253 java     STRU  struct sockaddr { AF_INET6, [::]:33848 }
 13253 java     RET   bind 0
 13253 java     CALL  setsockopt(0x4,0x29,0x9,0x7fffffbfd7f4,0x4)
 13253 java     RET   setsockopt 0
 13253 java     CALL  getsockopt(0x4,0x29,0x9,0x7fffffbfd8ac,0x7fffffbfd864)
 13253 java     RET   getsockopt 0
 13253 java     CALL  setsockopt(0x4,0x29,0xc,0x7fffffbfd8c0,0x14)
 13253 java     RET   setsockopt -1 errno 22 Invalid argument

is happening inside the mcast_join_leave() function inside the JDK here:

http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/9b8c96f96a0f/src/solaris/native/java/net/PlainDatagramSocketImpl.c

>From looking at the FreeBSD header files,
IPPROTO_IPV6 = 41 (0x29)
IPV6_MULTICAST_IF = 
IPV6_JOIN_GROUP = 12 (0xc)_

inside the mcast_join_leave() function what is basically happening is:

setsockopt(0x4, IPPROTO_IPV6, IPV6_MULTICAST_IF, ...)
getsockopt(0x4, IPPROTO_IPV6, IPV6_MULTICAST_IF, ...)
setsockopt(0x4, IPPROTO_IPV6, IPV6_JOIN_GROUP, ...)

the second setsockopt() is returning EINVAL

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-193246-2472-K4vcLezbJa>