diff options
author | Bill Meier <wmeier@newsguy.com> | 2010-08-24 14:59:11 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2010-08-24 14:59:11 +0000 |
commit | 5dfb5971638f53066e4d7914aabc7f91853008da (patch) | |
tree | 54ed77f649bba09eb9c24ceadefeb1c1b572bd9d /wiretap/daintree-sna.c | |
parent | f3f59dbf958687415d13c1861909e40837171cb1 (diff) |
Fix issue which causes daintree-sna frames to be rejected with "capture length > packet length".
This fix adds back two lines of code removed in SVN #33678.
"Define WTAP_ENCAP_IEEE802_15_4_NOFCS, for use in file formats that don't
include the FCS, and use it for the Daintree SNA file format. [...]"
This fix just restores the discarding of two end-of-frame "pad" bytes as each frame is read
from the capture file; This seems to me to be the correct behaviour.
svn path=/trunk/; revision=33909
Diffstat (limited to 'wiretap/daintree-sna.c')
-rw-r--r-- | wiretap/daintree-sna.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wiretap/daintree-sna.c b/wiretap/daintree-sna.c index 13111c151f..ec1d29fdad 100644 --- a/wiretap/daintree-sna.c +++ b/wiretap/daintree-sna.c @@ -175,6 +175,8 @@ daintree_sna_read(wtap *wth, int *err, gchar **err_info _U_, gint64 *data_offset /* convert packet data from ASCII string to hex, sanity-check its length against what we assume is the * packet length field, write data to frame buffer */ if ((wth->phdr.caplen = daintree_sna_hex_char(readData, err)) > FCS_LENGTH) { + /* Daintree doesn't store the FCS, but pads end of packet with 0xffff, which we toss */ + wth->phdr.caplen -= FCS_LENGTH; if (wth->phdr.caplen <= wth->phdr.len) { buffer_assure_space(wth->frame_buffer, wth->phdr.caplen); memcpy(buffer_start_ptr(wth->frame_buffer), readData, wth->phdr.caplen); |