Changeset 53eb1aa


Ignore:
Timestamp:
07/22/14 02:25:50 (6 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
a6c77b0
Parents:
ed18a6e
Message:

Fix a really old (since 2006) and bad bug in the int: format.

The wire length returned when using trace_config(trace, TRACE_OPTION_SNAPLEN, ...) will be limited to the capture length (well +4 due to MAC checksum adjustment) rather than the actual wire length.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux.c

    rd1af45d r53eb1aa  
    915915        iovec.iov_len = snaplen;
    916916
    917         hdr->wirelen = recvmsg(FORMAT(libtrace->format_data)->fd, &msghdr, 0);
     917        hdr->wirelen = recvmsg(FORMAT(libtrace->format_data)->fd, &msghdr, MSG_TRUNC);
    918918
    919919        if (hdr->wirelen==~0U) {
Note: See TracChangeset for help on using the changeset viewer.