1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 09:49:05 +00:00

Return -1 instead of calling pfatal in nmap_raw_socket.

There was one case where we previously didn't fatal, in nse_dnet.cc.
Move the fatal calls out of nmap_raw_socket and into the calling scope,
with the exception of the one in nse_dnet.cc.

The problem was reported by Rob Nicholls.
http://seclists.org/nmap-dev/2012/q4/186
This commit is contained in:
david
2012-10-31 16:09:47 +00:00
parent 37639cf132
commit 03946ba2f5
6 changed files with 13 additions and 2 deletions

View File

@@ -187,6 +187,8 @@ void FPNetworkControl::init(const char *ifname, devtype iftype) {
if (this->rawsd >= 0)
close(this->rawsd);
rawsd = nmap_raw_socket(ifname);
if (rawsd < 0)
pfatal("Couldn't obtain raw socket in %s", __func__);
}
/* De-register existing callers */