]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add check for pcap timestamp warnings. (GH #693)
authorGreg Steinbrecher <[email protected]>
Tue, 31 Jul 2018 12:54:04 +0000 (05:54 -0700)
committerDenis Ovsienko <[email protected]>
Tue, 31 Jul 2018 12:54:04 +0000 (13:54 +0100)
Previously would silently accept any of "host", "adapter", or
"adapter_unsynced" regardless of whether the interface supported
the option.

tcpdump.c

index 07965fa301881139d1e765ffc9aa52a5e9532512..e402c4282960260ec5a8e43045c425a7df4b4469 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -1305,6 +1305,10 @@ open_interface(const char *device, netdissect_options *ndo, char *ebuf)
                if (status < 0)
                        error("%s: Can't set time stamp type: %s",
                              device, pcap_statustostr(status));
+               else if (status > 0)
+                       warning("When trying to set timestamp type '%s' on %s: %s",
+                               pcap_tstamp_type_val_to_name(jflag), device,
+                               pcap_statustostr(status));
        }
 #endif
        status = pcap_activate(pc);