tcpdump mailing list archives
Re: tcpslice when first file not used [PATCH]
From: Alexander Dupuy <alex.dupuy () mac com>
Date: Fri, 23 Oct 2009 07:04:31 -0400
Hi Paul, I wrote:
Also, looking at the source code, there appears to be an omission in the error() function call in the pcap_dump_open failure case - the third parameter (pcap_geterr call) seems not to be used (This is a pre-existing bug that just happens to be in the vicinity of your change).
And reviewing the source code this occurs in another place as well, in the failure case of pcap_next.
--- tcpslice.c.orig 2009-10-23 07:01:12.000000000 -0400 +++ tcpslice.c 2009-10-23 07:01:26.000000000 -0400 @@ -573,7 +573,7 @@ s->start_pos = FTELL( pcap_file( s->p ) ); if (pcap_next(s->p, &s->hdr) == 0) - error( "error reading packet in %s: ", + error( "error reading packet in %s: %s", s->filename, pcap_geterr( s->p ) ); s->file_start_time = s->hdr.ts; @@ -669,7 +669,7 @@ dumper = pcap_dump_open(states->p, write_file_name); if (! dumper) { - error( "error creating output file %s: ", + error( "error creating output file %s: %s", write_file_name, pcap_geterr( states->p ) ); } } @alex -- mailto:alex.dupuy () mac com - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- tcpslice when first file not used [PATCH] Paul Herman (Oct 21)
- <Possible follow-ups>
- Re: tcpslice when first file not used [PATCH] Alexander Dupuy (Oct 23)
- Re: tcpslice when first file not used [PATCH] Michael Richardson (Oct 23)