1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-20 05:09:02 +00:00

Fix nse_dnet.cc compilation on Windows. This was broken in the merge in r20267.

This commit is contained in:
david
2010-09-23 01:58:32 +00:00
parent 8e1f52c46a
commit 6cc9a328b4

View File

@@ -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;