Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 May 2023 19:57:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 271335] www/lighttpd: fix listening on IPv6 and IPv4 addresses
Message-ID:  <bug-271335-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271335

            Bug ID: 271335
           Summary: www/lighttpd: fix listening on IPv6 and IPv4 addresses
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: pkubaj@FreeBSD.org
          Reporter: rcm@rcm.sh
          Assignee: pkubaj@FreeBSD.org
             Flags: maintainer-feedback?(pkubaj@FreeBSD.org)

Created attachment 242082
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D242082&action=
=3Dedit
www/lighttpd: fix listening on IPv6 addresses

getaddrinfo was changed recently to (re)introduce EAI_NODATA and EAI_ADDRFA=
MILY
error cases. These are non-standard error cases with differing semantics ac=
ross
different libc implementations. BSD libc returns EAI_ADDRFAMILY as being
synonymous with the nsdispatch error case of similar name NS_ADDRFAMILY.
However, GNU libc uses EAI_ADDRFAMILY to report trying to resolve an IPv4
address with an IPv6 hint and vice-versa.

lighttpd abuses this error case by assuming each listen address is first an
IPv6 address, falling through to trying IPv4 on error. On systems that defi=
ne
EAI_ADDRFAMILY, the return code is tested to be EAI_ADDRFAMILY before
attempting the IPv4 lookup. On platforms that don't define EAI_ADDRFAMILY, =
this
additional test is skipped.

This patch undefines EAI_ADDRFAMILY.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271335-7788>