Package: tftpd-hpa
Version: 5.0-5
Severity: normal
Hi,
I've recently upgraded tftpd-hpa, which stopped working. In my
daemon.log, I see:
cannot open IPv6 socket, disable IPv6: Address family not supported
by protocol
Cannot set nonblock flag on socket: Bad file descriptor
suspecting that these are related, I had a look at the source. It turns
out that the code has support of continuing without ipv6 if the ipv6
fails but ipv4 is opened succesfully, but it even does some stuff with
the ipv6 socket, even when it failed to open, resulting in this error
and the daemon quitting.
In tftpd.c, around line 536, I see:
if (ai_fam != AF_INET) {
fd6 = socket(AF_INET6, SOCK_DGRAM, 0);
if (fd6 < 0) {
if (fd4 < 0) {
syslog(LOG_ERR, "cannot open IPv6 socket: %m");
exit(EX_OSERR);
} else {
syslog(LOG_ERR,
"cannot open IPv6 socket, disable IPv6: %m");
}
}
#ifndef __CYGWIN__
set_socket_nonblock(fd6, 1);
#endif
memset(&bindaddr6, 0, sizeof bindaddr6);
bindaddr6.sin6_family = AF_INET6;
bindaddr6.sin6_port = htons(IPPORT_TFTP);
}
It would make sense to move the last four lines into an else of the second if
(fd6 < 0). Perhaps other changes are required as well, I did not test this.
The reason that the ipv6 socket fails to open is that I'm running a custom
kernel with ipv6 disabled, I expect this issue will not bite users that
run a stock Debian kernel, so I'm not giving this bug increased
severity.
Gr.
Matthijs
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.31-rc4 (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages tftpd-hpa depends on:
ii adduser 3.110 add and remove users and groups
ii debconf [debconf-2.0] 1.5.27 Debian configuration management sy
ii libc6 2.9-25 GNU C Library: Shared libraries
ii libwrap0 7.6.q-18 Wietse Venema's TCP wrappers libra
tftpd-hpa recommends no packages.
Versions of packages tftpd-hpa suggests:
pn syslinux-common <none> (no description available)
-- debconf information excluded
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]