Check that the received address is really AF_INET.

This commit is contained in:
hpa 2002-10-23 20:47:23 +00:00
parent e1508afaa2
commit 725183b5ba

View file

@ -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 */