| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The comparisons for forbidden addresses in address_is_local() only
work on canonicalized addresses.
Also, work in the case myaddr is NULL (if we ever call it that way...)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
We cannot canonicalize myaddr and not the from address. We need to
canonicalize both of them, or else we'll try to create an IPv4 socket
and bind an IPv6-mapped IPv4 address to it, which is going to fail.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On filesystems with subsecond resolution, like ext4, we can't trust the
timestamp of aconfig.h.in since autoheader leaves it truncated to second
resolution (apparently touch -r and cp -p can do this at the very least)
while configure has full subsecond resolution, so it can look newer even
when it was cleanly created first, leading to the build system looping
trying to recreate all of that again ...
So in the initial stage of a clean build we can get something like this:
$ make spotless
$ make autoconf
rm -rf MCONFIG configure config.log aconfig.h *.cache
autoconf
rm -f aconfig.h.in aconfig.h
autoheader
$ stat configure aconfig.h.in
File: ‘configure’
Device: 807h/2055d Inode: 9443466 Links: 1
Access: 2014-07-31 03:27:27.599293442 +0930
Modify: 2014-07-31 03:27:27.711290270 +0930
Change: 2014-07-31 03:27:27.711290270 +0930
File: ‘aconfig.h.in’
Device: 807h/2055d Inode: 9443467 Links: 1
Access: 2014-07-31 03:27:27.000000000 +0930
Modify: 2014-07-31 03:27:27.000000000 +0930
Change: 2014-07-31 03:27:27.903284841 +0930
And with a parallel build, that can then leave 'make all' racing to
remove and recreate aconfig.h (and possibly more things), while it
begins to build the first targets. Which then fail horribly like
we see here:
https://buildd.debian.org/status/fetch.php?pkg=tftp-hpa&arch=i386&ver=5.2%2B20140608-1&stamp=1406736363
Possibly we also need to move the actual build job into the rule for
the 'all' target, so that the build system update prerequisites are
guaranteed to be completed before it runs (as opposed to running in
parallel with them), but this change might be enough for now.
Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
The manpage had --mapfile but the code had --map-file.
Closes: #606267 in the Debian BTS
Reported-By: Jim Paris <jim@jtan.com>
Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Rename local variable to tftpd_progname to avoid a clash with glibc
global symbols and work around Debian bug #519006 (Closes: #564052).
[ hpa: specifically, double-underscore symbols in C are reserved for
the implementation, i.e. compiler/libc. ]
Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
It is pointless and newer gcc say it is a lose.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Document the "4" and "6" conditionals as well as how \i and \x handle
IPv6 addresses.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Allow remapping rules to be conditional on IPv4 vs IPv6.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
If we receive IPv4 addresses mapped to IPv6, convert them back to IPv4
so that mapping scripts which use \i behave sanely.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
Add feature test macros for MacOS X, and don't require
IPV6_RECVPKTINFO to exist.
Reported-by: YJZ <vollkommen@gmx.net>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
Linux no longer tries to match the local address with the remote one,
so address_is_local() fails. Try instead to simply see if we can bind
to the explicit address.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
|
| |
Part of my Intel job now...
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Simplify the option parsing to make use of the fact that all the
options we support are integer options. This fixes a buffer overflow
in the utimeout option.
Reported-by: Timo Warns <warns@pre-sense.de>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Duplicate WRQ packets can really hurt, since they end up accessing the
same file. This attempts to lock the file, which should work for the
case where a correctly implemented TFTP stack uses the same session ID
(port number) for each retry; in any other case they look like
multiple sessions to the same file and it is a crapshoot if we end up
with the correct one.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
When uploading a file that is larger than 32MB (with standard block
size), the block number will roll over. If it rolls over to 0, the code
mistakenly resends the option ack frame instead of acknowledging the 0
data block. This change fixes that behavior.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we can't figure out the source address, we have the "fall on our
face" version of myrecvfrom(); make sure its prototype matches. This
handles building on machines where sockaddr_t != int and yet there is
no way to get the source address. This apparently affects at least
one version of Solaris.
Reported-by: Georg Schwarz <georg.schwarz@freenet.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
| |
| |
| |
| |
| |
| | |
struct formats should be static const; make it so and mark all users
const.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|/
|
|
|
|
|
| |
Instead of taking a boolean value for get/put, pass a character; this
allows us to extend the number of possibilities in the future.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
| |
Setting the umask moved later, right before entering the select loop,
so that it does not affect the permissions of the pid file.
Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
| |
Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
| |
Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
mandir et all uses $(datarootdir), not $(DATAROOTDIR)
Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
| |
|
|
|
|
|
| |
We require GNU make, so we can have autoconf built from inside the
Makefile. Just make autogen.sh do "make autoconf" for convenience.
|
| |
|
| |
|
|
|
|
| |
Use the correct file descriptors so we correctly turn off PMTU.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
We need to cast IPv6 addresses from SOCKADDR_P() to struct in6_addr *
on some platforms, including at least MacOS X.
|
| |
|
|
|
|
|
|
|
| |
If the AI_CANONNAME or AI_ADDRCONFIG flags are missing, just set them
to zero.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Support editline as an alternative to readline.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|