mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Check return value of eth_send in case of errors
This commit is contained in:
@@ -206,8 +206,11 @@ static int ethernet_send (lua_State *L)
|
|||||||
log_write(LOG_STDOUT, "%s: Ethernet frame (%lu bytes) > %s\n",
|
log_write(LOG_STDOUT, "%s: Ethernet frame (%lu bytes) > %s\n",
|
||||||
SCRIPT_ENGINE, len, udata->devname);
|
SCRIPT_ENGINE, len, udata->devname);
|
||||||
}
|
}
|
||||||
eth_send(udata->eth, frame, len);
|
size_t sent = eth_send(udata->eth, frame, len);
|
||||||
return nseU_success(L);
|
if (sent == len)
|
||||||
|
return nseU_success(L);
|
||||||
|
else
|
||||||
|
return nseU_safeerror(L, "eth_send error: %lu", sent);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ip_open (lua_State *L)
|
static int ip_open (lua_State *L)
|
||||||
|
|||||||
Reference in New Issue
Block a user