Changeset 1439466 for tools/traceanon


Ignore:
Timestamp:
04/24/13 11:01:44 (9 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:
c73f536
Parents:
ec56195
Message:
  • Fixed pointer arithmetic bug in traceanon that was not anonymising IP headers embedded inside of ICMP messages correctly
  • Also, fixed traceanon to wipe ICMP checksums just like we do with TCP and UDP
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/traceanon/traceanon.c

    r4c92c49 r1439466  
    9292                 * internally
    9393                 */
     94               
    9495                if (icmp->type == 3
    9596                                || icmp->type == 5
    9697                                || icmp->type == 11) {
     98                        char *ptr = (char *)icmp;
    9799                        encrypt_ips(
    98                                 (struct libtrace_ip*)icmp+
    99                                         sizeof(struct libtrace_icmp),
     100                                (struct libtrace_ip*)(ptr+
     101                                        sizeof(struct libtrace_icmp)),
    100102                                enc_dest,
    101103                                enc_source);
    102104                }
     105
     106                if (enc_source || enc_dest)
     107                        icmp->checksum = 0;
    103108        }
    104109}
     
    314319                        tcp->check = 0;
    315320                }
    316 
     321       
    317322                /* TODO: Encrypt IP's in ARP packets */
    318323
Note: See TracChangeset for help on using the changeset viewer.