public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/27066]  New: libgcj native socket code does not support IPv6
@ 2006-04-06 19:40 cjw at daneel dot dyndns dot org
  2006-04-06 19:43 ` [Bug libgcj/27066] " cjw at daneel dot dyndns dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: cjw at daneel dot dyndns dot org @ 2006-04-06 19:40 UTC (permalink / raw)
  To: java-prs

Java Sockets do not know on creation if they will be used for IPv6 or IPv4, so
the gnu::java::net::PlainSocketImpl::create method should use PF_INET6 instead
of AF_INET. The other methods - bind and connect - must then translate IPv4
addresses to IPv4-in-IPv6. Behavior with HAVE_INET6 not defined should probably
not be changed. The code is in libjava/gnu/java/net/natPlainSocketImplPosix.cc
.


-- 
           Summary: libgcj native socket code does not support IPv6
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cjw at daneel dot dyndns dot org
  GCC host triplet: powerpc-mandriva-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27066


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/27066] libgcj native socket code does not support IPv6
  2006-04-06 19:40 [Bug libgcj/27066] New: libgcj native socket code does not support IPv6 cjw at daneel dot dyndns dot org
@ 2006-04-06 19:43 ` cjw at daneel dot dyndns dot org
  2006-04-06 20:08 ` mckinlay at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: cjw at daneel dot dyndns dot org @ 2006-04-06 19:43 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from cjw at daneel dot dyndns dot org  2006-04-06 19:43 -------
Created an attachment (id=11219)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11219&action=view)
Example patch to fix IPv6 support


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27066


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/27066] libgcj native socket code does not support IPv6
  2006-04-06 19:40 [Bug libgcj/27066] New: libgcj native socket code does not support IPv6 cjw at daneel dot dyndns dot org
  2006-04-06 19:43 ` [Bug libgcj/27066] " cjw at daneel dot dyndns dot org
@ 2006-04-06 20:08 ` mckinlay at redhat dot com
  2006-04-06 22:38 ` cjw at daneel dot dyndns dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mckinlay at redhat dot com @ 2006-04-06 20:08 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from mckinlay at redhat dot com  2006-04-06 20:08 -------
I'm not sure I follow this. create() does not get called until the socket is
bound. Don't we know at that point whether we're binding to an IPV4 or IPV6
address?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27066


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/27066] libgcj native socket code does not support IPv6
  2006-04-06 19:40 [Bug libgcj/27066] New: libgcj native socket code does not support IPv6 cjw at daneel dot dyndns dot org
  2006-04-06 19:43 ` [Bug libgcj/27066] " cjw at daneel dot dyndns dot org
  2006-04-06 20:08 ` mckinlay at redhat dot com
@ 2006-04-06 22:38 ` cjw at daneel dot dyndns dot org
  2006-04-11 18:08 ` mckinlay at redhat dot com
  2006-04-12 19:08 ` cjw at daneel dot dyndns dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cjw at daneel dot dyndns dot org @ 2006-04-06 22:38 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from cjw at daneel dot dyndns dot org  2006-04-06 22:38 -------
AFAICT create() is called in Socket's getImpl() method, which in turn is called
from e.g. setTcpNoDelay() and calling that after a plain "new Socket()" means
no bind was done yet... Anyway, the address is not passed to create() so this
information is currently not available even when create() is called from
bind().


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27066


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/27066] libgcj native socket code does not support IPv6
  2006-04-06 19:40 [Bug libgcj/27066] New: libgcj native socket code does not support IPv6 cjw at daneel dot dyndns dot org
                   ` (2 preceding siblings ...)
  2006-04-06 22:38 ` cjw at daneel dot dyndns dot org
@ 2006-04-11 18:08 ` mckinlay at redhat dot com
  2006-04-12 19:08 ` cjw at daneel dot dyndns dot org
  4 siblings, 0 replies; 6+ messages in thread
From: mckinlay at redhat dot com @ 2006-04-11 18:08 UTC (permalink / raw)
  To: java-prs



------- Comment #4 from mckinlay at redhat dot com  2006-04-11 18:08 -------
You are correct - I didn't notice that setTcpNoDelay, etc, call getImpl() -
however, this could be fixed if neccessary.

The question is whether this fix is the best one. Is there any disadvantage
(performance or otherwise) to always using PF_INET6 sockets, even for IPv4
addresses?


-- 

mckinlay at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-04-11 18:08:20
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27066


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/27066] libgcj native socket code does not support IPv6
  2006-04-06 19:40 [Bug libgcj/27066] New: libgcj native socket code does not support IPv6 cjw at daneel dot dyndns dot org
                   ` (3 preceding siblings ...)
  2006-04-11 18:08 ` mckinlay at redhat dot com
@ 2006-04-12 19:08 ` cjw at daneel dot dyndns dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cjw at daneel dot dyndns dot org @ 2006-04-12 19:08 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from cjw at daneel dot dyndns dot org  2006-04-12 19:08 -------
There are probably disadvantages: it doesn't seem possible to bind to 127.0.0.1
this way. So choosing the socket domain that matches the address to
bind/connect to is probably a good idea. I thought other java implementations
use the IPv4-in-IPv6 system but now I'm not so sure about that.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27066


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-04-12 19:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-06 19:40 [Bug libgcj/27066] New: libgcj native socket code does not support IPv6 cjw at daneel dot dyndns dot org
2006-04-06 19:43 ` [Bug libgcj/27066] " cjw at daneel dot dyndns dot org
2006-04-06 20:08 ` mckinlay at redhat dot com
2006-04-06 22:38 ` cjw at daneel dot dyndns dot org
2006-04-11 18:08 ` mckinlay at redhat dot com
2006-04-12 19:08 ` cjw at daneel dot dyndns dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).