diff options
author | Martin Pool <mbp@samba.org> | 2002-01-25 02:15:58 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2002-01-25 02:15:58 +0000 |
commit | af32f69eb09f4aff718879ba8e53debd7325ddd3 (patch) | |
tree | ec113ca7aef5e71b684375ee8004a3fea84175be /clientname.c | |
parent | 0cd2f40764dd156de309f7536f3867968b6c0fdd (diff) | |
download | rsync-af32f69eb09f4aff718879ba8e53debd7325ddd3.tar.gz |
Doc.
Diffstat (limited to 'clientname.c')
-rw-r--r-- | clientname.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/clientname.c b/clientname.c index aedf05e7..de002db1 100644 --- a/clientname.c +++ b/clientname.c @@ -99,7 +99,10 @@ char *client_name(int fd) /** - * Get the sockaddr for the client. + * Get the sockaddr for the client. + * + * If it comes in as an ipv4 address mapped into IPv6 format then we + * convert it back to a regular IPv4. **/ void client_sockaddr(int fd, struct sockaddr_storage *ss, @@ -172,9 +175,12 @@ int lookup_name(int fd, const struct sockaddr_storage *ss, -/* Do a forward lookup on name_buf and make sure it corresponds to ss - * -- otherwise we may be being spoofed. If we suspect we are, then - * we don't abort the connection but just emit a warning. */ +/** + * Do a forward lookup on @p name_buf and make sure it corresponds to + * @p ss -- otherwise we may be being spoofed. If we suspect we are, + * then we don't abort the connection but just emit a warning, and + * change @p name_buf to be "UNKNOWN". + **/ int check_name(int fd, const struct sockaddr_storage *ss, socklen_t ss_len, @@ -192,9 +198,8 @@ int check_name(int fd, error = getaddrinfo(name_buf, port_buf, &hints, &res0); if (error) { rprintf(FERROR, - RSYNC_NAME ": forward name lookup for %s:%s failed: %s\n", - name_buf, port_buf, - gai_strerror(error)); + RSYNC_NAME ": forward name lookup for %s failed: %s\n", + name_buf, gai_strerror(error)); strcpy(name_buf, default_name); return error; } |