From: Robert Edmonds Date: Sat, 16 Apr 2016 00:48:52 +0000 (-0400) Subject: dnswasher: Remove offsets from IPv6 src/dst pointers X-Git-Tag: dnsdist-1.0.0~9^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a78b2983c99e7b9f8b5c52cf60b02124a63f0681;p=thirdparty%2Fpdns.git dnswasher: Remove offsets from IPv6 src/dst pointers I'm not entirely sure why this code was offsetting the IPv6 source/destination header fields, but this commit removes those offsets. This results in the obfuscation of the first 64 bits of the IPv6 source/destination addresses. (Arguably the whole address should be obfuscated, though.) --- diff --git a/pdns/dnswasher.cc b/pdns/dnswasher.cc index d9f0466fa7..2ebff8e2bb 100644 --- a/pdns/dnswasher.cc +++ b/pdns/dnswasher.cc @@ -85,8 +85,8 @@ try pr.d_ip->ip_sum=0; } else if (pr.d_ip->ip_v == 6) { - uint64_t *src=1+(uint64_t*)&pr.d_ip6->ip6_src; - uint64_t *dst=1+(uint64_t*)&pr.d_ip6->ip6_dst; + uint64_t *src=(uint64_t*)&pr.d_ip6->ip6_src; + uint64_t *dst=(uint64_t*)&pr.d_ip6->ip6_dst; if(dh->qr) *dst=ipo.obf6(*dst);