Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
af32f69e
Commit
af32f69e
authored
Jan 25, 2002
by
Martin Pool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc.
parent
0cd2f407
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
clientname.c
clientname.c
+12
-7
No files found.
clientname.c
View file @
af32f69e
...
...
@@ -100,6 +100,9 @@ char *client_name(int fd)
/**
* 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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment