SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
21
net/ntopng/patches/patch-src_NetworkInterface_cpp
Normal file
21
net/ntopng/patches/patch-src_NetworkInterface_cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
cope with openbsd nonstandard bpf_timeval
|
||||
|
||||
Index: src/NetworkInterface.cpp
|
||||
--- src/NetworkInterface.cpp.orig
|
||||
+++ src/NetworkInterface.cpp
|
||||
@@ -1997,9 +1997,13 @@ bool NetworkInterface::processPacket(u_int32_t bridge_
|
||||
(2) ensures that periodic_stats_update is not performed too frequently as it could be detrimental for performances and lead
|
||||
to packet drops.
|
||||
*/
|
||||
+ timeval tmpt;
|
||||
+ tmpt.tv_sec = when->tv_sec;
|
||||
+ tmpt.tv_usec = when->tv_usec;
|
||||
+
|
||||
if(flow->get_current_bytes_cli2srv() + flow->get_current_bytes_srv2cli() >= PERIODIC_STATS_UPDATE_MIN_REFRESH_BYTES
|
||||
- && Utils::msTimevalDiff(when, flow->get_current_update_time()) >= PERIODIC_STATS_UPDATE_MIN_REFRESH_MS) {
|
||||
- flow->periodic_stats_update(when);
|
||||
+ && Utils::msTimevalDiff(&tmpt, flow->get_current_update_time()) >= PERIODIC_STATS_UPDATE_MIN_REFRESH_MS) {
|
||||
+ flow->periodic_stats_update(&tmpt);
|
||||
}
|
||||
|
||||
return(pass_verdict);
|
Loading…
Add table
Add a link
Reference in a new issue