SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
31
net/ntopng/patches/patch-src_PcapInterface_cpp
Normal file
31
net/ntopng/patches/patch-src_PcapInterface_cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
cope with openbsd nonstandard bpf_timeval
|
||||
|
||||
Index: src/PcapInterface.cpp
|
||||
--- src/PcapInterface.cpp.orig
|
||||
+++ src/PcapInterface.cpp
|
||||
@@ -289,9 +289,13 @@ static void* packetPollLoop(void* ptr) {
|
||||
|
||||
if(firstPktTS.tv_sec == 0) {
|
||||
startTS = now;
|
||||
- firstPktTS = hdr->ts;
|
||||
+ firstPktTS.tv_sec = hdr->ts.tv_sec;
|
||||
+ firstPktTS.tv_usec = hdr->ts.tv_usec;
|
||||
} else {
|
||||
- u_int32_t packetTimeDelta = Utils::msTimevalDiff(&hdr->ts, &firstPktTS);
|
||||
+ timeval tmpt;
|
||||
+ tmpt.tv_sec = hdr->ts.tv_sec;
|
||||
+ tmpt.tv_usec = hdr->ts.tv_usec;
|
||||
+ u_int32_t packetTimeDelta = Utils::msTimevalDiff(&tmpt, &firstPktTS);
|
||||
u_int32_t fromStartTimeDelta = Utils::msTimevalDiff(&now, &startTS);
|
||||
|
||||
if (packetTimeDelta > fromStartTimeDelta) {
|
||||
@@ -306,7 +310,8 @@ static void* packetPollLoop(void* ptr) {
|
||||
}
|
||||
}
|
||||
|
||||
- hdr->ts = now;
|
||||
+ hdr->ts.tv_sec = now.tv_sec;
|
||||
+ hdr->ts.tv_usec = now.tv_usec;
|
||||
}
|
||||
|
||||
if((pkt != NULL) && (hdr->caplen > 0)) {
|
Loading…
Add table
Add a link
Reference in a new issue