diff options
author | Guido Falsi <madpilot@FreeBSD.org> | 2020-04-13 22:58:17 +0000 |
---|---|---|
committer | Guido Falsi <madpilot@FreeBSD.org> | 2020-04-13 22:58:17 +0000 |
commit | fecb475fd0df70cff36ffc3d8585cb855bade464 (patch) | |
tree | a3b13320bf91f7458899b62b177404a65f4f7851 /net/ntopng | |
parent | fd63d4af6c3b65e8c6d25fdeec095a4d7d540e7d (diff) | |
download | ports-fecb475fd0df70cff36ffc3d8585cb855bade464.tar.gz ports-fecb475fd0df70cff36ffc3d8585cb855bade464.zip |
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)
MFH: 2020Q2
Notes
Notes:
svn path=/head/; revision=531641
Diffstat (limited to 'net/ntopng')
-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")) |