[systemd-bugs] [Bug 84604] New: systemd.socket unit bind with AF_INET6 on IPv4 ports (cups)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Oct 2 09:23:31 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=84604

            Bug ID: 84604
           Summary: systemd.socket unit bind with AF_INET6 on IPv4 ports
                    (cups)
           Product: systemd
           Version: unspecified
          Hardware: Other
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
          Assignee: systemd-bugs at lists.freedesktop.org
          Reporter: odyx at debian.org
        QA Contact: systemd-bugs at lists.freedesktop.org

Hi,

I have tried to make the cupsd socket-activation reliable on Debian through
systemd.socket configuration. It works for the most parts besides failing on
ipv4-only hosts, see https://bugs.debian.org/747073 .

I think I've pretty much tried all combinations of ListenStream, BindIPv6Only
and BindToDevice stanzas and ended up quick-patching a workaround in CUPS, see
https://www.cups.org/str.php?L4491 .

I've settled on the following statements:
    ListenStream=631
    BindIPv6Only=both
    BindToDevice=lo
    PassCredentials=true

My understanding of the problem is that there is no way to write a
systemd.socket unit file that will reliably bind a port in the correct mode on
all available localhost IPs no matter if ipv6 is enabled on the host or not. As
I've phrased in the CUPS bug above, it seems to me that either you get an
AF_INET6 on the IPv6 addresses (with BindIPv6Only=ipv6-only) or you get
AF_INET6 on both the IPv6 addresses and the IPv4 addresses (with
BindIPv6Only=both). It feels wrong to bind as IPv6 on IPv4 addresses indeed.

What am I doing wrong? Shouldn't systemd bind (and hand) AF_INET sockets on
IPv4 addresses? Where should this "disagreement" be fixed (is CUPS right to
refuse AF_INET6 on ipv4 addresses; is systemd right in binding these)? Am I
totally off in the above analysis (I'd really like to understand the core
issue… and get this fixed!).

TIA, cheers,

OdyX

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20141002/b81e5fe1/attachment.html>


More information about the systemd-bugs mailing list