diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2009-11-11 21:50:20 -0800 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2009-11-11 21:50:20 -0800 |
commit | 30b50e6d7d2fe01c03e9f652d8333061fbb602da (patch) | |
tree | 8391390c4c9a17be76e5bc00b4704abd5ef018a6 /lua | |
parent | 5c0c799f5236ed622dfc97e5fead9bc1d0f1322d (diff) | |
download | libnet-30b50e6d7d2fe01c03e9f652d8333061fbb602da.tar.gz |
Was adding options only if there was payload, caught by unit tests.
Diffstat (limited to 'lua')
-rw-r--r-- | lua/net.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -240,6 +240,16 @@ static int lnet_dump(lua_State* L) return 1; } +#ifdef NET_DUMP +/* Call from inside gdb to see current state of libnet stack */ +void dump(lua_State* L) { + lnet_dump(L); + printf("%s\n", lua_tostring(L, -1)); + lua_pop(L, 1); +} +#endif + + /*- - net = net:clear() @@ -553,7 +563,7 @@ static int lnet_ipv4 (lua_State *L) * - has final ip options bloc, or not */ - if(!payload) { + if(!options) { libnet_pblock_delete(ud, oblock); } else { options_ptag = libnet_build_ipv4_options(options, optionsz, ud, options_ptag); |