aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2010-08-24 14:59:11 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2010-08-24 14:59:11 +0000
commit9a988e7c02d458fe860c1f2441f81cf26e04aa93 (patch)
tree54ed77f649bba09eb9c24ceadefeb1c1b572bd9d /wiretap
parente87f3c557a056794a193cb43e29cfaf74352610b (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33909 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/daintree-sna.c2
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);