Socket ipv6-only option
Pierre Abbat
phma at bezitopo.org
Mon Jul 1 01:09:26 PDT 2013
I'm writing a program that sends UDP packets to another instance of the
program. It now sends a test packet to all results of a resolver query. I run
it on darner (DragonFly) and caracal (Linux) and tell them to send packets to
each other. I see two differences between the two OSes:
*On darner, the resolver returns only the IPv6 address of caracal, though
running host returns both. On caracal, it returns both addresses of darner.
*On darner, the socket comes up in IPv6-only mode. On caracal, it accepts IPv4
packets (I checked this by telling caracal to send to caracal). Telling
caracal to send to darner's IPv4 address results in no packets received.
I tried to clear the IPv6-only option; this causes an abort on both OSes.
Stepping through it on DragonFly, I see that the error code returned from the
setsockopt call is 2.
Attempting to declare separate sockets for IPv4 and IPv6 results in "Address
already in use", at least in Linux.
Pierre
--
I believe in Yellow when I'm in Sweden and in Black when I'm in Wales.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: network.cpp
Type: text/x-c++src
Size: 1193 bytes
Desc: not available
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20130701/8cd5027c/attachment.bin>
More information about the Users
mailing list