Just in case syslog has been restarted, bounce the log socket before
the chroot.
Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Implement the "rollover" option, to set the rollover block number to
anything other than zero. Apparently some idiots have gotten the idea
that block numbers should roll over to one, rather than zero.
This patch does two things:
a) makes tftp-hpa to compile on systems with no IPv6 support (there were
some IPv6 macros used unconditionally);
b) removes a stray binary character, which was annoying.
The following patch sets additional hints to restrict the addresses
returned by getaddrinfo() to specify preferred socket type, protocol
and a flag to return only v4/v6 addresses based on the configured
addresses.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
If a user does supply a IPv4 or IPv6 address
but force the other type with -4 or -6, give an error.
The patch also fix the special [::ffff:127.0.1]
address handling, it work now if you bind to this
address but only if you not force IPv6 only, it seems
that the kernel does not signal connections to a
IPv6 socket listen on [::ffff:127.0.0.1], if it was bound
IPv6 only.
I think we can live with it and do not need a special test
for this address.
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This patch detects numeric address types to avoid unnecessary
warnings/errors. It also cleans up error printing to not print error
messages on stderr in the deamon case.
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This patch fix a issue with numeric IPv6 addresses in the
tftpd -a address[:port] option.
Since IPv6 addresses use colon ':' in differnt counts itself, we cannot detect,
if the last colon is a seperator, so it is needed to put the IPv6 address into
square brackets, e.g. [2001:db8::1], so a optional port assignment is
unambiguous.
The patch also allows to specify numeric IPv6 addresses in other places enclosed
in [], but in these cases it accept these also without [].
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add support for IPv6 in the server and client.
You can force the use of IPv4 or IPv6 only with new
-4 and -6 commandline options, if IPv6 support was compiled in.
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add autoconf rules to detect IPv6 availability and some of the neeeded
support functions. Add stubs for getaddrinfo and inet_ntop.
You can disable IPv6 at compile time with
./configure --without-ipv6
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
if you try to build tftp-hpa in parallel, it may fail as the tftp and tftpd
subdirs may try to link before the libcommon.a has a chance to be generated
in the common subdir
trivial patch attached to address this
-mike