Issue: 5818
This commit corrects the timestamp handling for the packet to work with
the SCTime_t struct.
} else if (ret == -1)
SET_PKT_LEN(p, 0);
- ret = nflog_get_timestamp(nfa, &p->ts);
+ struct timeval tv;
+ ret = nflog_get_timestamp(nfa, &tv);
if (ret != 0) {
- struct timeval tv;
- memset(&tv, 0, sizeof(struct timeval));
+ memset(&tv, 0, sizeof(tv));
gettimeofday(&tv, NULL);
- p->ts = SCTIME_FROM_TIMEVAL(&tv);
}
+ p->ts = SCTIME_FROM_TIMEVAL(&tv);
p->datalink = DLT_RAW;