From 49ec11f5aad2c6c29b02036ef9744c5680ee88a0 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 18 Jun 2021 01:24:41 -0700 Subject: [PATCH] erf: set the tsprecision value of a newly-created IDB. Don't assume the default is correct, because there's no guarantee of that - in fact, there's currently a guarantee that it's not, as it's initialized to 0, which is WTAP_TSPREC_SECS. --- wiretap/erf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wiretap/erf.c b/wiretap/erf.c index 3b6f7338bc..86dc04600f 100644 --- a/wiretap/erf.c +++ b/wiretap/erf.c @@ -2460,6 +2460,7 @@ static int erf_populate_interface(erf_t *erf_priv, wtap *wth, union wtap_pseudo_ int_data_mand->wtap_encap = WTAP_ENCAP_ERF; /* int_data.time_units_per_second = (1LL<<32); ERF format resolution is 2^-32, capture resolution is unknown */ int_data_mand->time_units_per_second = 1000000000; /* XXX Since Wireshark only supports down to nanosecond resolution we have to dilute to this */ + int_data_mand->tsprecision = WTAP_TSPREC_NSEC; int_data_mand->snap_len = 65535; /* ERF max length */ /* XXX: if_IPv4addr opt 4 Interface network address and netmask.*/