Changeset ab25522


Ignore:
Timestamp:
07/03/08 14:45:59 (13 years ago)
Author:
Scott Raynel <smr26@…>
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:
4e4a77f
Parents:
41c254d
Message:

Revert r1361. My bad, the SLL header seems to have a static 8 byte
address field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/protocols_pktmeta.c

    r41c254d rab25522  
    2121                uint16_t *type, uint32_t *remaining)
    2222{
    23         libtrace_sll_header_t *sll = (libtrace_sll_header_t*) link;
    24 
    25         /* Determine SLL header length */
    26         uint32_t hlen = ntohs(sll->halen) + (sizeof(uint16_t) * 4);
    27 
    28         if (remaining) {
    29                 if (*remaining <= hlen) {
    30                         *remaining = 0;
    31                         return NULL;
    32                 }
    33                 *remaining -= hlen;
     23        libtrace_sll_header_t *sll;
     24
     25        sll = (libtrace_sll_header_t*) link;
     26
     27        if (remaining) {
     28                if (*remaining <= sizeof(*sll)) {
     29                        *remaining = 0;
     30                        return NULL;
     31                }
     32                *remaining-=sizeof(*sll);
    3433        }
    3534
    3635        if (type) *type = ntohs(sll->hatype);
    3736
    38         return (void*) ((char*)sll + hlen);
     37        return (void*)((char*)sll+sizeof(*sll));
    3938
    4039}
Note: See TracChangeset for help on using the changeset viewer.