summaryrefslogtreecommitdiff
path: root/tcpdump.c
diff options
context:
space:
mode:
authorGreg Steinbrecher <steinbrecher@alum.mit.edu>2018-07-31 05:54:04 -0700
committerDenis Ovsienko <denis@ovsienko.info>2018-07-31 13:54:04 +0100
commit7ebcaf603d7edc5e028195c4b360e3a857f5de3e (patch)
treeb688bd4fc917a3778cfcacc55a24848c66968255 /tcpdump.c
parent3ee05fb6ceb00057a3c6ff13e3bc395645116592 (diff)
downloadtcpdump-7ebcaf603d7edc5e028195c4b360e3a857f5de3e.tar.gz
Add check for pcap timestamp warnings. (GH #693)
Previously would silently accept any of "host", "adapter", or "adapter_unsynced" regardless of whether the interface supported the option.
Diffstat (limited to 'tcpdump.c')
-rw-r--r--tcpdump.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tcpdump.c b/tcpdump.c
index 07965fa3..e402c428 100644
--- 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);