1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 17:09:02 +00:00

Make a more descriptive error when raw sockets fail.

Doesn't happen often, but as the message says, certain Solaris zones can
cause problems here. This message is more informative than the previous
"socket troubles in Init"
This commit is contained in:
dmiller
2014-07-11 04:00:26 +00:00
parent e603da4a4f
commit 5ce61b556e

View File

@@ -1746,7 +1746,12 @@ void UltraScanInfo::Init(std::vector<Target *> &Targets, struct scan_lists *pts,
#endif
rawsd = nmap_raw_socket();
if (rawsd < 0)
pfatal("socket troubles in %s", __func__);
pfatal("Couldn't open a raw socket. "
#if defined(sun) && defined(__SVR4)
"In Solaris shared-IP non-global zones, this requires the PRIV_NET_RAWACCESS privilege. "
#endif
"Error"
);
/* We do not want to unblock the socket since we want to wait
if kernel send buffers fill up rather than get ENOBUF, and
we won't be receiving on the socket anyway