diff options
author | H. Peter Anvin <hpa@zytor.com> | 2015-08-07 11:55:08 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2015-08-07 11:55:08 -0700 |
commit | b2b34cecc8cbc18ff6f1fc00bda6ae6e9011e6c7 (patch) | |
tree | 7bb56b454d032423800d5a07a1575fcea1b39e83 | |
parent | 7678ae7f14e5aa6792c4486d4eedcb2db887872c (diff) | |
download | tftp-hpa-master.tar.gz |
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>
-rw-r--r-- | tftpd/recvfrom.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tftpd/recvfrom.c b/tftpd/recvfrom.c index 83ef29a..d7ef500 100644 --- a/tftpd/recvfrom.c +++ b/tftpd/recvfrom.c @@ -255,6 +255,9 @@ myrecvfrom(int s, void *buf, int len, unsigned int flags, } #endif } + + normalize_ip6_compat(myaddr); + /* If the address is not a valid local address, * then bind to any address... */ @@ -268,7 +271,6 @@ myrecvfrom(int s, void *buf, int len, unsigned int flags, } } - normalize_ip6_compat(myaddr); normalize_ip6_compat(from); return n; |