From a78b2983c99e7b9f8b5c52cf60b02124a63f0681 Mon Sep 17 00:00:00 2001 From: Robert Edmonds Date: Fri, 15 Apr 2016 20:48:52 -0400 Subject: [PATCH] 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.) --- pdns/dnswasher.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.47.2