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
This commit is contained in:
parent
f3f59dbf95
commit
5dfb597163
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue