when sysctl net.ipv6.bindv6only=1, xinetd can not bind to both IPv4 and IPv6 on same port

Bug #561475 reported by Yanis Refrokorg
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xinetd (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: xinetd

I am using Ubuntu 9.10 Karmic, and have altered sysctl net.ipv6.bindv6only so it is set to 1 - this is so that listening to an IPv6 port does not automatically listen to the corresponding IPv4 (required for another application on this machine, unrelated to xinetd).

However, this causes problems with xinetd - it refuses to bind to both 0.0.0.0:PPP and :::PPP, where PPP is the same port number for both. And thus only binds to the first one that it attempts. The error in the log is "bind failed (Address already in use (errno = 98)). service = XXX"

The configuration looks like this:

/etc/xinetd.d/XXX:

  service XXX
  {
        flags = IPv4
        socket_type = stream
        wait = no
        user = UUU
        server = /home/XXX/YYY.py
        port = PPP
  }

/etc/xinetd.d/XXX6:

  service XXX
  {
        flags = IPv6
        socket_type = stream
        wait = no
        user = UUU
        server = /home/XXX/YYY.py
        port = PPP
  }

I also tried combining the IPv4 and IPv6 flags:

/etc/xinetd.d/XXX:

  service XXX
  {
        flags = IPv4 IPv6
        socket_type = stream
        wait = no
        user = UUU
        server = /home/XXX/YYY.py
        port = PPP
  }

But this results in the error "Service XXX specified as both IPv4 and IPv6 - DISABLING" and no binding to any interface.

I also tried adding the lines "bind = 0.0.0.0" and "bind = ::" respectively to the configuration files but that had no effect.

Mathias Gug (mathiaz)
Changed in xinetd (Ubuntu):
importance: Undecided → Low
Changed in xinetd (Ubuntu):
status: New → Confirmed
Revision history for this message
LtWorf (tiposchi) wrote :

In general the open group defines that parameter to be 0 by default:
http://pubs.opengroup.org/onlinepubs/007904875/functions/xsh_chap02_10.html

So all the developers assume it to be 0 unless they set it explicitly in their code.

You might want to patch your broken application instead of reporting a bug caused by local settings.

LtWorf (tiposchi)
Changed in xinetd (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.