Datagram source address question
Hello,
I'm having some serious trouble with my IPv6 socket programming.
I create a datagram socket in my client application, and bind() it to the
'any' address. The server binds its socket to an explicit global scope
IPv6 address.
The client sends a datagram to the server, with a source address of
::1, which is reasonable since the client and server executes on the same
machine. The server responds to ::1 with a reply. Now the problems start:
Even though I used bind() to bind the server socket to an explicit
address, the source address of the server->client datagram turns out to be
::1, as determined from what recvfrom() puts in the from address argument.
So when the client in turn replies, it will send to ::1, which is an
address the server is not listening to, and the communication comes to a
halt.
Is this a bug in the IPv6 stack, or have I misunderstood something?
Thanks in advance,
Pontus
--
Pontus Lidman, pontus@lysator.liu.se, Software Engineer
No matter how cynical you get, it's impossible to keep up.
Scene: www.dc-s.com | MUD: tyme.envy.com 6969 | irc: irc.quakenet.eu.org
Reply to: