IPv6 server, IPv4 clients and getpeername.

Thomas Quinot (thomas@cuivre.fr.eu.org)
Mon, 12 Jul 1999 17:23:41 +0200


[ Please Cc: me any reply -- I'll post a summary of answers
to the list. ]

Hi all,

I am encountering a strange situation with IPv6. I have
a simple server which creates a PF_INET6/SOCK_STREAM socket,
binds it to a sockaddr_in6 with sin6_port 12345 and sin6_addr
in6addr_any, then listens on it and accepts a connection.

As expected, I can establish an IPv4 connection to this server
from a purely IPv4 client. The problem is, in that case, getpeername
on the server correctly returns a struct sockaddr with sa_family == AF_INET6
*but** the contents for that address do not correspond to the
IPv4 client's address (whereas it should contain the IPv6-mapped
form of the IPv4 client address).

IS this a known problem?

Feel free to ask for more information or source code...

Thanks for your help,
Thomas.

-- 
    Thomas.Quinot@Cuivre.FR.EU.ORG   <URL:http://web.fdn.fr/~tquinot/>

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/