[Clfs-support] traceroute-2.0.12 - Bad value for ai_flags - Cannot handle cmdline arg

Jason Aeschilman jason at fatpipeinc.com
Tue Jun 15 14:07:53 PDT 2010


I have a Pure64 CLFS build completed and I'm adding packages from CBLFS.  I
came across the following issue with traceroute and a solution for it, which
I thought I would share with the list in case it proves helpful to someone.

I configured all packages in CLFS with "--disable-nls" to disable locale
support.  This way I can save some space by removing locale-related data
(see small-lfs.txt hint).  However, this appears to result in traceroute
failing to resolve names because it uses the AI_IDN flag with getaddrinfo()
and that apparently is not valid without locale support.  I would get the
following error whenever I tried to use traceroute:

# traceroute 10.0.0.1
10.0.0.1: Bad value for ai_flags
Cannot handle "host" cmdline arg `10.0.0.1' on position 1 (argc 1)

# traceroute www.yahoo.com
www.yahoo.com: Bad value for ai_flags
Cannot handle "host" cmdline arg `www.yahoo.com' on position 1 (argc 1)

The solution was simply to comment out the line that sets ai_flags to
AI_IDN.  Here is the patch:

diff -Naur traceroute-2.0.12.org/traceroute/traceroute.c
traceroute-2.0.12/traceroute/traceroute.c
--- traceroute-2.0.12.org/traceroute/traceroute.c       2008-09-17
07:30:22.000000000 -0600
+++ traceroute-2.0.12/traceroute/traceroute.c   2010-06-14
20:32:19.000000000 -0600
@@ -176,7 +176,6 @@

        memset (&hints, 0, sizeof (hints));
        hints.ai_family = af;
-       hints.ai_flags = AI_IDN;

        ret = getaddrinfo (name, NULL, &hints, &res);
        if (ret) {




More information about the Clfs-support mailing list