View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-18-2010, 08:47 PM   #1
Registered: Mar 2004
Location: Palmerston North, New Zealand
Distribution: Fedora, Red Hat
Posts: 50

Rep: Reputation: 15
Issues with getaddrinfo() apparently not working as expected.

I have an issue with cfservd, from the cfengine package not listening on both ipv4 and ipv6. Tracing through the source indicated that the issue was with the getaddrinfo() call. I have used the example code on the man page and can confirm that it doesn't work as expected on either Fedora 12, Fedora 10 or CentOS 5.3

The servers I am testing on have both ipv4 and ipv6 enabled and working. i.e. I can ssh to them using either -4 or -6 and netstat -a shows and :::22

Running the example code on the Fedora servers results in only a single IPv4 address structure being returned by the getaddrinfo call and hence only listening on the one protocol. Strangely, on the CentOS server only the IPv6 address structure is returned.

I need both IPv4 and IPv6 for cfengine but am at a complete loss as to how to get it to work when the issue appears to be something fundamentally wrong at the OS level.

Any pointers much appreciated.
Old 01-19-2010, 01:54 PM   #2
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Does "ifconfig -a" has IPv4 and IPv6 addresses?


getaddrinfo, ipv4, ipv6

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
find not working as expected luusac Linux - Newbie 8 08-28-2008 11:07 AM
ln command not working as expected walterbyrd Linux - Software 3 01-04-2008 01:51 PM
Umount not working as expected hexalite2k5 Red Hat 0 09-09-2007 11:51 AM
chmod apparently not working Noido Linux - Software 2 06-29-2005 01:32 PM
Apparently working NICs receiving but not sending CestusGW Linux - Networking 8 11-02-2003 01:28 PM

All times are GMT -5. The time now is 02:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration