bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cfservd ipv6


From: Pekka Savola
Subject: Re: cfservd ipv6
Date: Thu, 28 Mar 2002 23:27:48 +0200

address@hidden wrote:
>
>
>So how does one do it?

Basically, the first step would be removing 'break' from:

--8<--
   if (bind(sd,ap->ai_addr,ap->ai_addrlen) == 0)
      {
      Debug("Bound to address %s\n",sockaddr_ntop(ap->ai_addr));
      break; 
      }
--8<--

This way, when looping through the list, the code will try to bind to
both address families.

However, binding first to IPv4 and then to IPv6 may fail e.g. on
Linux.  Also, first to IPv6 and then IPv4 may also fail.  The second
step would probably be changing the error handling of bind to not to
error out about specific errors.

Perhaps something like:

--8<--
   if (bind(sd,ap->ai_addr,ap->ai_addrlen) < 0) 
      {
      if (!ap->ai_next)
         CfLog(cferror,"Could not bind server address","bind");
      close(sd);   
      sd = -1;
      continue;    
      }   
}
--8<--

would work instead? (Completely untested, I don't have DB on by BSD
boxes).

>On 28 Mar, Pekka Savola wrote:
>> address@hidden wrote:
>>>Sean, I think that even this is okay. The reason the address doesn't appear 
>>>is
>>>that the wildcard address for listening is all zeroes. This is normal. Best 
>>>to
>>>see what happens on the client side when you try to contact that host
>>>(use cfagent -d2, and cfservd -d2) If you can tell me the exact messages
>>>at failure, on both sides, I can possible help more,
>> 
>> OpenBSD is the only implemention that doesn't support IPv4 when
>> binding to IPv6 '::' through mapped addresses.
>> 
>> So if you use IPv6 with OpenBSD, you MUST bind to both IPv4 and IPv6
>> wildcard address.  There is no other choice.

Pekka Savola                    pekkas at netcore dot fi
---
Across the nations the stories spread like spiderweb laid upon spiderweb, 
and men and women planned the future, believing they knew truth. They 
planned, and the Pattern absorbed their plans, weaving toward the future 
foretold.               -- Robert Jordan: The Path of Daggers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]