Changeset 078bd65 for lib/format_linux.c


Ignore:
Timestamp:
12/01/10 10:33:40 (11 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
c7f8451
Parents:
740661f
Message:
  • Turns out int: doesn't capture the FCS either - this fixes the bug where capturing on int: and converting to pcap will lose the last four bytes of legit payload in a full payload capture
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux.c

    r5f329ab r078bd65  
    689689static int linuxnative_get_wire_length(const libtrace_packet_t *packet)
    690690{
    691         return ((struct libtrace_linuxnative_header*)(packet->buffer))->wirelen;
     691
     692        int wirelen = ((struct libtrace_linuxnative_header*)(packet->buffer))->wirelen;
     693
     694        /* Include the missing FCS */
     695        if (trace_get_link_type(packet) == TRACE_TYPE_ETH)
     696                wirelen += 4;
     697
     698        return wirelen;
    692699}
    693700
Note: See TracChangeset for help on using the changeset viewer.