tftpd already requires sigaction() to compile, so there is no reason
to use anything else. It also allows for nicer combination of flags.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
bsd_signal() may not be defined, and there is really no reason to even
try to use it if sigaction() is avaiable; using sigaction() guarantees
the semantics we really want.
Replace uses of common variables with explicit instantiation and
extern declarations in a header file.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
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>
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>