pcapng: drop count is unknown for ISB without isb_if_drop option

Bug: 11489
Change-Id: I38bcc2570c2efc461e4eb0edbff8ac2a7371c725
Reviewed-on: https://code.wireshark.org/review/10311
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
This commit is contained in:
Hadriel Kaplan 2015-08-29 19:14:13 -04:00
parent 605f33caaf
commit 7791c6f4eb
1 changed files with 6 additions and 2 deletions

View File

@ -181,11 +181,15 @@ summary_fill_in(capture_file *cf, summary_tally *st)
iface.snap = wtapng_if_descr.snap_len;
iface.has_snap = (iface.snap != 65535);
iface.encap_type = wtapng_if_descr.wtap_encap;
iface.isb_comment = NULL;
if(wtapng_if_descr.num_stat_entries == 1){
/* dumpcap only writes one ISB, only handle that for now */
if_stats = &g_array_index(wtapng_if_descr.interface_statistics, wtapng_if_stats_t, 0);
iface.drops_known = TRUE;
iface.drops = if_stats->isb_ifdrop;
if (if_stats->isb_ifdrop != G_GUINT64_CONSTANT(0xFFFFFFFFFFFFFFFF)) {
iface.drops_known = TRUE;
iface.drops = if_stats->isb_ifdrop;
}
/* XXX: this doesn't get used, and might need to be g_strdup'ed when it does */
iface.isb_comment = if_stats->opt_comment;
}
g_array_append_val(st->ifaces, iface);