mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 21:21:31 +00:00
OS detection changes to improve timing/reliability, print fprint in more cases, etc. Also some tiny changes from Kris Katterjohn
This commit is contained in:
2
tcpip.cc
2
tcpip.cc
@@ -785,7 +785,7 @@ int resolve(char *hostname, struct sockaddr_storage *ss, size_t *sslen,
|
||||
|
||||
int islocalhost(const struct in_addr * const addr) {
|
||||
char dev[128];
|
||||
/* If it is 0.0.0.0 or starts with 127.0.0.1 then it is
|
||||
/* If it is 0.0.0.0 or starts with 127 then it is
|
||||
probably localhost */
|
||||
if ((addr->s_addr & htonl(0xFF000000)) == htonl(0x7F000000))
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user