apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52709] New: Apache can't bind to if eth0 as only IPv6
Date Sun, 19 Feb 2012 15:38:33 GMT

             Bug #: 52709
           Summary: Apache can't bind to if eth0 as only IPv6
           Product: APR
           Version: 1.4.5
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: jmv_deb@nirgal.com
    Classification: Unclassified

>From http://bugs.debian.org/500558

Apache can't bind to if eth0 as only IPv6

I traced back that problem to a call in libapr1, in call_resolver()
getaddrinfo("", NULL, &hints, ...) that returns -9
because hints contains AI_ADDRCONFIG

Without that hint, it works.

Extract from call_resolver:
    if (family == APR_UNSPEC) {
        /* By default, only look up addresses using address types for
         * which a local interface is configured, i.e. no IPv6 if no
         * IPv6 interfaces configured. */
        hints.ai_flags = AI_ADDRCONFIG;

Aurelien Jarno pointed out that whatever what the documentation says, RFC3493
explicitly exclude the loopback addresses:

   If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be
   returned only if an IPv4 address is configured on the local system,
   and IPv6 addresses shall be returned only if an IPv6 address is
   configured on the local system.  The loopback address is not
   considered for this case as valid as a configured address.

This results in:
[Mon Sep 29 10:33:20 2008] [crit] (EAI 9)Address family for hostname not
supported: alloc_listener: failed to set up sockaddr for
Syntax error on line 1 of /etc/apache2/ports.conf:
Listen setup failed

I think cannot use AI_ADDRCONFIG if we are to allow localhost binding.

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org

View raw message