Skip to contentSkip to conversation

Problem with dual IPv4/IPv6 connect

DISCUSSION Tom Marshall 1 participant 1 message Nov 16, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I'm using kernel 2.6.9 from kernel.org and I think I found a small problem in the dual IPv4/IPv6 connect code. Here's what happens:

[Note both peer addresses are the same (Solaris 9) machine]

s = socket(AF_INET6, SOCK_STREAM, 0)
connect(s, [fec0::203:baff:fe88:5a15]:1554) => EINPROGRESS Put socket in select's write set
Kernel sends TCPv6 SYN
Kernel receives ICMPv6 Time Exceeded (routing error) Socket becomes writable
getsockopt(s, SO_ERROR) => EHOSTUNREACH connect(s, 192.168.168.241:1554) => ECONNABORTED

At this point, if I call connect again with the same arguments, it behaves
normally: EINPROGRESS followed by success. This leads me to believe that the IPv6 connect has not updated the socket state properly.

Signature · 3 lines
At Group L, Stoffel oversees six first-rate programmers, a managerial
challenge roughly comparable to herding cats.
        -- The Washington Post Magazine, 9 June, 1985