Changeset 1930

Show
Ignore:
Timestamp:
10/30/07 20:51:50 (13 months ago)
Author:
aturner
Message:

enable src mac spoofing on OS X now that Leopard fixes issue w/ spoofing and
large frames. fixes #142, #151

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/3.2/src/common/sendpacket.c

    r1897 r1930  
    392392    pcap_t *pcap; 
    393393    sendpacket_t *sp; 
    394 /* 
    395394    u_int spoof_eth_src = 1; 
    396395    int fd; 
    397  */ 
     396 
    398397    assert(device); 
    399398    assert(errbuf); 
     
    409408    sp->handle.pcap = pcap; 
    410409 
    411 /* 
    412410    fd = pcap_get_selectable_fd(pcap); 
    413     if (ioctl(fd, BIOCSHDRCMPLT, &spoof_eth_src) == -1) { 
     411    if (ioctl(fd, BIOCSHDRCMPLT, &spoof_eth_src) == -1) 
    414412        errx(1, "Unable to enable source MAC spoof support: %s", strerror(errno)); 
    415     } 
    416  */ 
    417413     
    418414    return sp; 
     
    648644    struct bpf_version bv; 
    649645    u_int v; 
    650 #if defined(BIOCGHDRCMPLT) && defined(BIOCSHDRCMPLT) && !(__APPLE__) 
     646#if defined(BIOCGHDRCMPLT) && defined(BIOCSHDRCMPLT) 
    651647    u_int spoof_eth_src = 1; 
    652648#endif 
     
    705701     *  automatic filling of the link level source address. 
    706702     */ 
    707 #if defined(BIOCGHDRCMPLT) && defined(BIOCSHDRCMPLT) && !(__APPLE__) 
     703#if defined(BIOCGHDRCMPLT) && defined(BIOCSHDRCMPLT) 
    708704    if (ioctl(mysocket, BIOCSHDRCMPLT, &spoof_eth_src) == -1) { 
    709705        snprintf(errbuf, SENDPACKET_ERRBUF_SIZE,