Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jun 2011 12:34:57 +0100
From:      "Steven Hartland" <killing@multiplay.co.uk>
To:        "Matthias Andree" <matthias.andree@gmx.de>
Cc:        freebsd-net@freebsd.org, freebsd-java@freebsd.org, freebsd-hackers@freebsd.org
Subject:   Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send
Message-ID:  <01DA6DDBE3684C3785734F16008244E4@multiplay.co.uk>
References:  <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> <4E051576.7090505@gmx.de> <512CB9DD5802403BA3ACC48FE3AE63F5@multiplay.co.uk> <4E0866AD.6010203@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- 
From: "Matthias Andree" <matthias.andree@gmx.de>
>> No I'm not its replying to the sender. 
> 
> Yes you are, check your trace: The sendto address and port are the same
> as the bound address.

This is a bug in truss it seems, Bjoern said he's gonna have a look at
it. Doesn't matter what you bind to it always reports this value in the
truss output.

>> In the java code we have:-
>> socket.send( new DatagramPacket( data, data.length,
>> src.getSocketAddress() ) );
>> Where src is the src packet. This works fine on IPv4 only machines and
>> when the jdk is told to use only IPv4 stack. So its not a problem with
>> the java code itself but could well be an issue with the
> 
> What data type is it?

All mute as the Bjoern found and fixed the issue, it was a bug in the
kernel fixed by:-
http://svnweb.freebsd.org/base?view=revision&revision=220463

>> Oops sorry cut and paste error (wrong line) heres the correct line.
>> root     java       894   20 udp4   85.236.109.212:25675  *:*
> 
> While a datagram socket, it does not match the socket()/bind() above.
> 
> An INET6-domain datagram socket would be listed as udp6 here.  Are you
> sure you're tracing the right VM and are looking at the right thread?

Again, truss isn't showing the correct results, confused me too ;-)

Possibly another bug in sockstat / netstat as well, when the socket is a
IPv6 socket bound to an IPv4 address maybe it should indicate this e.g.
udp6-4 instead of either udp4 or udp6; alternatively maybe udp6 + a IPv4
address is enough to indicate this, but that could cause confusion.

Thanks for looking at this, appreciated :)

    Regards
    Steve

================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster@multiplay.co.uk.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01DA6DDBE3684C3785734F16008244E4>