tcpdump mailing list archives
Re: [PATCH] Re: Bug: Counting dropped packets in
From: Guy Harris <guy () alum mit edu>
Date: Mon, 21 Sep 2009 10:48:17 -0700
On Sep 17, 2009, at 3:24 PM, Dustin Spicuzza wrote:
If you call linux_if_drops with a NULL device, then it segfaults when ittries to do strlen(). The only time this happens is if you call pcap_stats() on a pcap handle that is open but not activated (or the activation failed), and thus the device is NULL.
If you call pcap_stats() on a pcap handle that's open but not activated, p->stats_op points to pcap_not_initialized(), so pcap_stats() will just return an error.
That wasn't necessarily true if the activation failed, as the activate routine might have set the op pointers early in the process and not undone that if the activation fails; I've checked in a change to restore the op pointers on a failed activation.
That should make this a non-issue. - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Bug: Counting dropped packets in linux Dustin Spicuzza (Aug 27)
- Re: Bug: Counting dropped packets in linux Dustin Spicuzza (Aug 27)
- [PATCH] Re: Bug: Counting dropped packets in linux Dustin Spicuzza (Aug 28)
- Re: [PATCH] Re: Bug: Counting dropped packets in Stephen Donnelly (Aug 30)
- Re: [PATCH] Re: Bug: Counting dropped packets in Guy Harris (Sep 01)
- Re: [PATCH] Re: Bug: Counting dropped packets in Dustin Spicuzza (Sep 01)
- Re: [PATCH] Re: Bug: Counting dropped packets in Guy Harris (Sep 07)
- Re: [PATCH] Re: Bug: Counting dropped packets in Dustin Spicuzza (Sep 17)
- Re: [PATCH] Re: Bug: Counting dropped packets in Guy Harris (Sep 21)
- [PATCH] Re: Bug: Counting dropped packets in linux Dustin Spicuzza (Aug 28)
- Re: Bug: Counting dropped packets in linux Dustin Spicuzza (Aug 27)
- Re: [PATCH] Re: Bug: Counting dropped packets in linux Guy Harris (Sep 01)
- Re: [PATCH] Re: Bug: Counting dropped packets in Dustin Spicuzza (Sep 02)
