Changeset c0fdf31


Ignore:
Timestamp:
08/21/06 23:25:13 (14 years ago)
Author:
Perry Lorier <perry@…>
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:
4dfa44e
Parents:
1023ff4
Message:

Reject more broken packets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/protocols.c

    r496864e rc0fdf31  
    118118                case ARPHRD_ETHER:
    119119                        ret=trace_get_payload_from_ethernet(ret,type,remaining);
     120                        break;
     121                default:
     122                        /* Unknown hardware type */
     123                        return NULL;
    120124        }
    121125
     
    237241
    238242        if (!ret || type!=0x0800)
     243                return NULL;
     244
     245        /* Not an IPv4 packet */
     246        if (((libtrace_ip_t*)ret)->ip_v != 4)
    239247                return NULL;
    240248
Note: See TracChangeset for help on using the changeset viewer.