2008.11, x86

After running "ifconfig -a6 down", this call to getaddrinfo() continues to 
return an IPv6 address (in addition to IPv4):

  memset(&hints, 0, sizeof(hints));
  hints.ai_family = AF_UNSPEC;
  hints.ai_socktype = SOCK_STREAM;
  hints.ai_flags = AI_ADDRCONFIG;
  hints.ai_flags |= AI_PASSIVE;

  error = getaddrinfo(NULL, "80", &hints, &ai_list);

but an attempt to connect() to the returned IPv6 address results in ENETUNREACH.

With AI_ADDRCONFIG, getaddrinfo() should consider only non-loopback interfaces 
in determining whether to try to return an IPv6 address.

This is a simpler recreate of a failure many Apache users have seen on 
different levels of Solaris, in which Apache is trying using an IPv6 address 
returned by getaddrinfo() to connect to its listening socket but gets 
ENETUNREACH.

I'm not 100% confident that my "ifconfig -a6 down" mimics closely enough a 
typical non-IPv6 OpenSolaris installation, but the behavior certainly matches.  
ifconfig only shows IPv4 for my network interface, though both IPv4 and IPv6 
for loopback.

Comments?
-- 
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to