<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - systemd.socket unit bind with AF_INET6 on IPv4 ports (cups)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=84604">84604</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>systemd.socket unit bind with AF_INET6 on IPv4 ports (cups)
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>odyx@debian.org
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>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 <a href="https://bugs.debian.org/747073">https://bugs.debian.org/747073</a> .
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
<a href="https://www.cups.org/str.php?L4491">https://www.cups.org/str.php?L4491</a> .
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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>