tcpdump mailing list archives
Tcpdump doesn't check for pcap_set_tstamp_type warnings
From: Greg Steinbrecher <grs () fb com>
Date: Sun, 29 Jul 2018 15:57:11 +0000
Hi all, When tcpdump calls pcap_set_tstamp_type, it only checks if the returned status is less than 0; if the specific type requested exists but isn't supported (e.g. `-j adapter` on a card that only supports adapter_unsynced) pcap_set_tstamp_type returns the warning code PCAP_WARNING_TSTAMP_TYPE_NOTSUP which is #defined to be 2 as it's a warning, not an error. End result is that, e.g., `-j adapter` on a card that only supports adapter_unsynced fails silently, falling back to host clock, with no warning. I'm happy to submit a pull request fixing this, but wanted to check if the preference is to (a) warn the user and move on or (b) treat this as a failure and quit. Cheers/Greg _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- Tcpdump doesn't check for pcap_set_tstamp_type warnings Greg Steinbrecher (Jul 29)
- Re: Tcpdump doesn't check for pcap_set_tstamp_type warnings Guy Harris (Jul 29)