mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 11:22:05 +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:
parent
e603da4a4f
commit
5ce61b556e
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue