diff options
author | Guido Falsi <madpilot@FreeBSD.org> | 2020-04-14 19:04:21 +0000 |
---|---|---|
committer | Guido Falsi <madpilot@FreeBSD.org> | 2020-04-14 19:04:21 +0000 |
commit | 08a2ad490a02da45ca558dd353677bd4e16759c6 (patch) | |
tree | be0b5f70fa626c08ebbe4fed41ef93c84f658a06 /net | |
parent | MFH: r531689 (diff) |
MFH: r531641
Add patch replacing lua_tonumber() with lua_tointeger() inside
htons() calls.
Tese were causing build to fail on armv7, and it's more correct anyway.
Submitted by: garga (via email)
Approved by: ports-secteam (joneum)
Notes
Notes:
svn path=/branches/2020Q2/; revision=531713
Diffstat (limited to 'net')
-rw-r--r-- | net/ntopng/Makefile | 1 | ||||
-rw-r--r-- | net/ntopng/files/patch-src_ParsedFlow.cpp | 25 |
2 files changed, 26 insertions, 0 deletions
diff --git a/net/ntopng/Makefile b/net/ntopng/Makefile index fbfe2fd23f92..0928e090136d 100644 --- a/net/ntopng/Makefile +++ b/net/ntopng/Makefile @@ -3,6 +3,7 @@ PORTNAME= ntopng PORTVERSION= 4.0.d20200326 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net diff --git a/net/ntopng/files/patch-src_ParsedFlow.cpp b/net/ntopng/files/patch-src_ParsedFlow.cpp new file mode 100644 index 000000000000..eac7fcc5a4f2 --- /dev/null +++ b/net/ntopng/files/patch-src_ParsedFlow.cpp @@ -0,0 +1,25 @@ +--- src/ParsedFlow.cpp.orig 2020-03-26 13:52:23 UTC ++++ src/ParsedFlow.cpp +@@ -127,17 +127,17 @@ void ParsedFlow::fromLua(lua_State *L, int index) { + if(!strcmp(key, "vlan_id")) + vlan_id = lua_tonumber(L, -1); + else if(!strcmp(key, "version")) +- version = htons(lua_tonumber(L, -1)); ++ version = htons(lua_tointeger(L, -1)); + else if(!strcmp(key, "src_port")) +- src_port = htons(lua_tonumber(L, -1)); ++ src_port = htons(lua_tointeger(L, -1)); + else if(!strcmp(key, "dst_port")) +- dst_port = htons(lua_tonumber(L, -1)); ++ dst_port = htons(lua_tointeger(L, -1)); + else if(!strcmp(key, "l4_proto")) + l4_proto = lua_tonumber(L, -1); + else if(!strcmp(key, "tcp_flags")) +- tcp.tcp_flags = htons(lua_tonumber(L, -1)); ++ tcp.tcp_flags = htons(lua_tointeger(L, -1)); + else if(!strcmp(key, "direction")) +- direction = htons(lua_tonumber(L, -1)); ++ direction = htons(lua_tointeger(L, -1)); + else if(!strcmp(key, "first_switched")) + first_switched = lua_tonumber(L, -1); + else if(!strcmp(key, "last_switched")) |