From d24de0d17d02dfd97eb3f3895e884097b7e97af9 Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Sat, 21 Apr 2007 08:55:26 +0000 Subject: [PATCH] make dnswasher wash everything, not just rd git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1037 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/dnswasher.cc | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/pdns/dnswasher.cc b/pdns/dnswasher.cc index 7bb423ebc..a803af383 100644 --- a/pdns/dnswasher.cc +++ b/pdns/dnswasher.cc @@ -58,21 +58,18 @@ try if(ntohs(pr.d_udp->uh_dport)==53 || ntohs(pr.d_udp->uh_sport)==53 && pr.d_len > sizeof(dnsheader)) { dnsheader* dh=(dnsheader*)pr.d_payload; - if(dh->rd) { - uint32_t *src=(uint32_t*)&pr.d_ip->ip_src; - uint32_t *dst=(uint32_t*)&pr.d_ip->ip_dst; - - if(dh->qr) - *dst=htonl(ipo.obf(*dst)); - else - *src=htonl(ipo.obf(*src)); - - pr.d_ip->ip_sum=0; - - pw.write(); - } + uint32_t *src=(uint32_t*)&pr.d_ip->ip_src; + uint32_t *dst=(uint32_t*)&pr.d_ip->ip_dst; + + if(dh->qr) + *dst=htonl(ipo.obf(*dst)); + else + *src=htonl(ipo.obf(*src)); + + pr.d_ip->ip_sum=0; + + pw.write(); } - } cerr<<"Saw "<