mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Fix nse_dnet.cc compilation on Windows. This was broken in the merge in r20267.
This commit is contained in:
parent
8e1f52c46a
commit
6cc9a328b4
1 changed files with 5 additions and 1 deletions
|
|
@ -182,7 +182,7 @@ static int ip_send (lua_State *L)
|
|||
{
|
||||
nse_dnet_udata *udata = (nse_dnet_udata *) luaL_checkudata(L, 1, DNET_METATABLE);
|
||||
const char *packet = luaL_checkstring(L, 2);
|
||||
|
||||
char dev[16];
|
||||
int ret;
|
||||
|
||||
if (udata->sock == -1)
|
||||
|
|
@ -191,6 +191,8 @@ static int ip_send (lua_State *L)
|
|||
if (lua_objlen(L, 2) < sizeof(struct ip))
|
||||
return luaL_error(L, "ip packet too short");
|
||||
|
||||
*dev = '\0';
|
||||
|
||||
if (o.sendpref & PACKET_SEND_ETH)
|
||||
{
|
||||
struct route_nfo route;
|
||||
|
|
@ -209,6 +211,8 @@ static int ip_send (lua_State *L)
|
|||
if (!nmap_route_dst(&dstss, &route))
|
||||
goto usesock;
|
||||
|
||||
Strncpy(dev, route.ii.devname, sizeof(dev));
|
||||
|
||||
if (route.ii.device_type != devt_ethernet)
|
||||
goto usesock;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue