Changeset 8ccb7897


Ignore:
Timestamp:
03/10/11 16:24:22 (10 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:
4c90362
Parents:
361d283
Message:
  • Fixed bug where the packet buffer can be freed twice following a trace termination event
  • Fixed bug with processing SLL traces that have actually retained the Ethernet header
Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/format_helper.c

    r9cc1266 r8ccb7897  
    166166                        trace_destroy_packet(trace->event.packet);
    167167                        trace->event.packet = NULL;
     168                        packet->buffer = NULL;
     169                        packet->header = NULL;
     170                        packet->payload = NULL;
     171                        packet->buf_control = TRACE_CTRL_EXTERNAL;
    168172                        return event;
    169173                }
  • lib/protocols_pktmeta.c

    r9cc1266 r8ccb7897  
    3737#include <assert.h>
    3838
    39 #ifndef WIN32
    40 #include <net/if_arp.h>
    41 #endif
    42 
    43 #ifndef ARPHRD_ETHER
    44 #define ARPHRD_ETHER    1               /* Ethernet 10/100Mbps.  */
    45 #endif
    46 
    47 #ifndef ARPHRD_PPP
    48 #define ARPHRD_PPP      512
    49 #endif
     39#include "arphrd.h"
    5040
    5141/* This file contains all the protocol decoding functions for the meta-data
     
    186176        void *nexthdr;
    187177        uint16_t arphrd;
     178        uint16_t next;
    188179       
    189180        assert(meta != NULL);
     
    194185                case TRACE_TYPE_LINUX_SLL:
    195186                        nexthdr = trace_get_payload_from_linux_sll(meta,
    196                                         &arphrd, NULL, remaining);
     187                                        &arphrd, &next, remaining);
    197188
    198189                        /* Ethernet header is usually absent in SLL captures,
    199190                         * so we don't want to skip it just yet */
    200                         if (arphrd_type_to_libtrace(arphrd) == TRACE_TYPE_ETH)
     191                        if (arphrd_type_to_libtrace(arphrd) == TRACE_TYPE_ETH && next != 0x0060)
    201192                                *linktype = TRACE_TYPE_NONE;
    202193                        else
Note: See TracChangeset for help on using the changeset viewer.