mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Check return value of eth_send in case of errors
This commit is contained in:
parent
044295b0c8
commit
a0b2d3d80e
1 changed files with 5 additions and 2 deletions
|
|
@ -206,8 +206,11 @@ static int ethernet_send (lua_State *L)
|
|||
log_write(LOG_STDOUT, "%s: Ethernet frame (%lu bytes) > %s\n",
|
||||
SCRIPT_ENGINE, len, udata->devname);
|
||||
}
|
||||
eth_send(udata->eth, frame, len);
|
||||
return nseU_success(L);
|
||||
size_t sent = eth_send(udata->eth, frame, len);
|
||||
if (sent == len)
|
||||
return nseU_success(L);
|
||||
else
|
||||
return nseU_safeerror(L, "eth_send error: %lu", sent);
|
||||
}
|
||||
|
||||
static int ip_open (lua_State *L)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue