Project

General

Profile

Actions

Bug #2407

closed

Fix timestamp offline when pcap timestamp is zero

Added by Maurizio Abba over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

In offline mode, if the pcap starting timestamp is 0, localtime will never be updated. This prevent setting cause cached_minutes_start and cached_local_time array in util-time.c.

The issue with this behavior is that timestamp will be skipped whenever is needed.

The solution is to force setting the timestamp when cached_minute_start (in both mru and lru position) is zero (i.e, it's never been set before). Doing this will allow us to remove the check in the localtime_r call, as it's returned value will never be NULL.


Files

fix-timestamp-offline.pcap (2.77 KB) fix-timestamp-offline.pcap pcap downloading a generic .exe Maurizio Abba, 01/11/2018 08:32 AM
Actions

Also available in: Atom PDF