You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First thanks for your team continuing the development of xinetd.
I have noticed that xinetd produce "Setting IPV6_V6ONLY option failed" errors in syslog from time to time. It is just annoying, and xinetd works well. The problem happens in Debian's xinetd (1:2.3.15-6) and FreeBSD's (2.3.15_2), and I think it has been there for a long time.
After debugging, I realized that IPv6 to IPv4 redirection caused the error message. Example config:
service test
{
disable = no
port = 8080
redirect = 202.38.64.1 80
type = UNLISTED
protocol = tcp
socket_type = stream
user = nobody
wait = no
flags = IPv6
}
Whenever a client connect to :8080, xinetd generates that error:
$ ./xinetd -d -f xinetd.conf
......
18/10/8@16:05:20: DEBUG: 2621 {main_loop} select returned 1
18/10/8@16:05:20: DEBUG: 2621 {server_start} Starting service test
18/10/8@16:05:20: DEBUG: 2621 {main_loop} active_services = 1
18/10/8@16:05:20: ERROR: 22179 {redir_handler} Setting IPV6_V6ONLY option failed (Protocol not available (errno = 92))
18/10/8@16:05:20: DEBUG: 2621 {main_loop} active_services = 1
18/10/8@16:05:20: DEBUG: 2621 {main_loop} select returned 1
18/10/8@16:05:20: DEBUG: 2621 {check_pipe} Got signal 17 (Child exited)
18/10/8@16:05:20: DEBUG: 2621 {child_exit} waitpid returned = 22179
18/10/8@16:05:20: DEBUG: 2621 {server_end} test server 22179 exited
18/10/8@16:05:20: INFO: 2621 {conn_free} freeing connection
18/10/8@16:05:20: DEBUG: 2621 {child_exit} waitpid returned = -1
18/10/8@16:05:20: DEBUG: 2621 {main_loop} active_services = 1
The problematic code is in redirect.c (intruduced since 4587246):
When the redirect target is an IPv4 host, setting IPV6_V6ONLY fails and yields the error message.
In fact, I think this part should be removed. RedirServerFd is a client-side socket (not for listen but for connection to upstream server). AFAIK, setting IPV6_V6ONLY on a client-side socket makes no sense.
The text was updated successfully, but these errors were encountered:
Other socket options should also be examined. For example, SO_KEEPALIVE is set in both service.c and redirect.c, while TCP_NODELAY is not set in redirect.c.
It is not clear whether some flags in the config affects the connection between xinetd and redir upstream.
Hello, the patch seems to be correct. There should be no need to set the option on the client side.
Anyhow the other flags missing in places is mostly caused by most of the code to be copy&paste but since we are only in maintenance mode I personaly don't feel like refactoring :) Yet if there are patches we shall merge them.
First thanks for your team continuing the development of xinetd.
I have noticed that xinetd produce "Setting IPV6_V6ONLY option failed" errors in syslog from time to time. It is just annoying, and xinetd works well. The problem happens in Debian's xinetd (1:2.3.15-6) and FreeBSD's (2.3.15_2), and I think it has been there for a long time.
After debugging, I realized that IPv6 to IPv4 redirection caused the error message. Example config:
Whenever a client connect to :8080, xinetd generates that error:
The problematic code is in
redirect.c
(intruduced since 4587246):When the redirect target is an IPv4 host, setting
IPV6_V6ONLY
fails and yields the error message.In fact, I think this part should be removed.
RedirServerFd
is a client-side socket (not for listen but for connection to upstream server). AFAIK, settingIPV6_V6ONLY
on a client-side socket makes no sense.The text was updated successfully, but these errors were encountered: