(uint16_t *)p->tcph, 20, 0);
}
- memset(&p->ts, 0, sizeof(struct timeval));
p->ts = TimeGet();
if (direction == 0) {
ret = nflog_get_timestamp(nfa, &p->ts);
if (ret != 0) {
- memset(&p->ts, 0, sizeof(struct timeval));
- gettimeofday(&p->ts, NULL);
+ struct timeval tv;
+ memset(&tv, 0, sizeof(struct timeval));
+ gettimeofday(&tv, NULL);
+ p->ts = SCTIME_FROM_TIMEVAL(&tv);
}
p->datalink = DLT_RAW;
}
/* use parent time stamp */
- memcpy(&np->ts, &parent->ts, sizeof(struct timeval));
+ np->ts = parent->ts;
SCLogDebug("np %p", np);
PacketEnqueueNoLock(pq, np);