Changeset 4bbe9bd for lib/protocols_l3.c


Ignore:
Timestamp:
08/02/10 15:48:16 (11 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:
1326d5f
Parents:
9b097ea
Message:
  • Add check for the presence of sdl_len in the sockaddr_dl structure - OpenSolaris? doesn't seem to believe in length fields, which creates obvious issues
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/protocols_l3.c

    r3c2ddf4 r4bbe9bd  
    3333
    3434
     35#include "libtrace_int.h"
    3536#include "libtrace.h"
    3637#include "protocols.h"
    3738#include <assert.h>
    3839#include <stdlib.h>
    39 #include "config.h"
    4040
    4141#ifdef HAVE_NETPACKET_PACKET_H
     
    346346       
    347347        l2addr->sdl_family = AF_LINK;
     348#if HAVE_SDL_LEN == 1
    348349        l2addr->sdl_len = sizeof(struct sockaddr_dl);
     350#endif
    349351        l2addr->sdl_index = 0; /* Unused */
    350352        l2addr->sdl_alen = 6; /* Address length  */
     
    466468       
    467469        l2addr->sdl_family = AF_LINK;
     470#if HAVE_SDL_LEN == 1
    468471        l2addr->sdl_len = sizeof(struct sockaddr_dl);
     472#endif
    469473        l2addr->sdl_index = 0; /* Unused */
    470474        l2addr->sdl_alen = 6; /* Address length  */
Note: See TracChangeset for help on using the changeset viewer.