mirror of
https://kernel.googlesource.com/pub/scm/network/tftp/tftp-hpa
synced 2025-04-26 01:49:52 +03:00
Check that the received address is really AF_INET.
This commit is contained in:
parent
e1508afaa2
commit
725183b5ba
1 changed files with 5 additions and 0 deletions
|
@ -543,6 +543,11 @@ main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if ( from.sin_family != AF_INET ) {
|
||||
syslog(LOG_ERR, "received address was not AF_INET, please check your inetd config");
|
||||
exit(EX_PROTOCOL);
|
||||
}
|
||||
|
||||
if ( standalone && myaddr.sin_addr.s_addr == INADDR_ANY ) {
|
||||
/* myrecvfrom() didn't capture the source address; but we might
|
||||
have bound to a specific address, if so we should use it */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue