From 5f554fbe1664abe8511d1e644627375340d23942 Mon Sep 17 00:00:00 2001 From: Tomasz Pala Date: Sat, 28 Oct 2017 21:11:10 +0200 Subject: [PATCH] libpcap 1.8.0 reports "All USB buses" device with "Bus ID 0" Do not complain that it carries packets that belong to other buses: commit 003600f9 Include usbmon0 in the list of known devices, if it's supported. --- src/usb_bus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usb_bus.cpp b/src/usb_bus.cpp index 7e49fa0..8870a22 100644 --- a/src/usb_bus.cpp +++ b/src/usb_bus.cpp @@ -63,7 +63,7 @@ void usbtop::UsbBus::push(const pcap_pkthdr* h, const u_char* bytes) const uint8_t device_id = bytes[11]; const uint16_t bus_id = *((const uint16_t*) &bytes[12]); - if (bus_id != id()) { + if ((bus_id != id()) && id()) { std::cerr << "[bad packet] on bus " << id() << ", captured a packet claimed to be on bus " << bus_id << "." << std::endl; return; }