Changeset 40f19df for tools/tracereport


Ignore:
Timestamp:
05/14/07 16:37:24 (14 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:
de31abb
Parents:
d6d2a32
Message:

Check that link is not NULL in NLP report - rxerrors were causing segfaults

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracereport/nlp_report.c

    r466aed6 r40f19df  
    1212{
    1313        char *link=(char *)trace_get_link(packet);
    14         uint16_t type = htons(*(uint16_t*)(link+12));
     14        uint16_t type;
    1515        libtrace_direction_t dir = trace_get_direction(packet);
     16       
     17        if (!link)
     18                return;
     19        type = htons(*(uint16_t*)(link+12));
    1620
    1721        if (dir != TRACE_DIR_INCOMING && dir != TRACE_DIR_OUTGOING)
Note: See TracChangeset for help on using the changeset viewer.