Changeset 539 for trunk/src/ocateth.c


Ignore:
Timestamp:
02/05/10 11:59:17 (2 years ago)
Author:
eagle
Message:

pointer dereferences recoded in respect to strict alias checking of compiler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ocateth.c

    r510 r539  
    250250 
    251251   // tunnel header 
    252    *((uint32_t*) buf) = htonl(CNF(fhd_key[IPV6_KEY])); 
     252   set_tunheader(buf, htonl(CNF(fhd_key[IPV6_KEY]))); 
    253253 
    254254   // ethernet header 
    255    *((uint16_t*) ndp6->eth.ether_dhost) = 0x3333; 
     255   ndp6->eth.ether_dhost[0] = 0x33; 
     256   ndp6->eth.ether_dhost[1] = 0x33; 
    256257   memcpy(&ndp6->eth.ether_dhost[2], ((char*) &mcastd) + 12, 4); 
    257258   memcpy(ndp6->eth.ether_shost, CNF(ocat_hwaddr), ETHER_ADDR_LEN); 
     
    449450 
    450451   // check ethernet destination 
    451    if ((*((uint16_t*) &ndp6->eth.ether_dhost) != 0x3333) && memcmp(ndp6->eth.ether_dhost, CNF(ocat_hwaddr), ETHER_ADDR_LEN)) 
     452   if ((ndp6->eth.ether_dhost[0] != 0x33) && (ndp6->eth.ether_dhost[1] != 0x33) && memcmp(ndp6->eth.ether_dhost, CNF(ocat_hwaddr), ETHER_ADDR_LEN)) 
    452453   { 
    453454      log_debug("unknown destination MAC"); 
Note: See TracChangeset for help on using the changeset viewer.