Red Hat Bugzilla – Bug 50085
xinetd doesn't work with datagram sockets
Last modified: 2007-04-18 12:35:11 EDT
Description of Problem:
I'm trying to set up a tftp server on Redhat 7.1. I have the tftpd package installed.
My /etc/xinetd.d/tftp is as follows:
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
disable = no
socket_type = dgram
wait = yes
user = nobody
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.tftpd
server_args = /tftpboot
However, when I start, restart, or reload xinetd I get the message:
xinetd: socket creation failed (Socket type not supported (errno = 94)). service = tftp
If I do an strace on xinetd I see
socket(PF_INET, SOCK_DGRAM, IPPROTO_TCP) = -1 ESOCKTNOSUPPORT (Socket type not supported)
SOCK_DGRAM and IPPROTO_TCP definitely do not go together.
It looks like in the sources... the third parameter to socket() is always zero. That's probably the problem.
adding 'protocol=udp' to /etc/xinetd.d/tftp made the problem go away but it would be nice if xinetd chose a reasonable default protocol when one isn't specified.
tftp-server-0.17-14 (and probably earlier ones, but that's one I verified) have
protocol=udp in its xinetd.