when sysctl net.ipv6.bindv6only=1, xinetd can not bind to both IPv4 and IPv6 on same port
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.
Changed in xinetd (Ubuntu): | |
importance: | Undecided → Low |
Changed in xinetd (Ubuntu): | |
status: | New → Confirmed |
Changed in xinetd (Ubuntu): | |
status: | Confirmed → Invalid |
In general the open group defines that parameter to be 0 by default: pubs.opengroup. org/onlinepubs/ 007904875/ functions/ xsh_chap02_ 10.html
http://
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.