diff options
author | Dario Lombardo <lomato@gmail.com> | 2015-02-02 10:37:17 +0100 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-02-03 23:35:20 +0000 |
commit | b8f040c42e2684ee9a2c10e8e3968759e3a39c4e (patch) | |
tree | d6c69c770a2a635b8d0ebc7950f4f18dc1dd5dce /dumpcap.c | |
parent | 9b22a2f895e1a244ef95984ab2a3e68d6a4330ab (diff) |
Dumpcap: avoid collecting stats on nf* interfaces.
On Linux nf* interfaces don't collect stats properly and don't allows multiple connections.
Change-Id: I69d8f343017d77bda313de7d2c501fab542f2e9b
Bug: 10886
Reviewed-on: https://code.wireshark.org/review/6796
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1447,6 +1447,18 @@ print_statistics_loop(gboolean machine_readable) for (if_entry = g_list_first(if_list); if_entry != NULL; if_entry = g_list_next(if_entry)) { if_info = (if_info_t *)if_entry->data; + +#ifdef __linux__ + /* On Linux nf* interfaces don't collect stats properly and don't allows multiple + * connections. We avoid collecting stats on them. + */ + if (!strncmp(if_info->name, "nf", 2)) { + g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG, "Skipping interface %s for stats", + if_info->name); + continue; + } +#endif + #ifdef HAVE_PCAP_OPEN pch = pcap_open(if_info->name, MIN_PACKET_SIZE, 0, 0, NULL, errbuf); #else |