From 49f61cba4ca35c7ad77657da50a2b0ef8d24e395 Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Sun, 25 Jun 2006 19:34:49 +0000 Subject: [PATCH] make dnswasher compile again git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@862 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/dnspcap.cc | 2 +- pdns/dnswasher.cc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pdns/dnspcap.cc b/pdns/dnspcap.cc index 976eab4af..25b1c10d5 100644 --- a/pdns/dnspcap.cc +++ b/pdns/dnspcap.cc @@ -72,7 +72,7 @@ try d_ip=reinterpret_cast(d_buffer + d_skipMediaHeader); - uint16_t contentCode; + uint16_t contentCode=0; if(d_pfh.linktype==1) contentCode=ntohs(d_ether->ether_type); else if(d_pfh.linktype==113) diff --git a/pdns/dnswasher.cc b/pdns/dnswasher.cc index 6456f5f94..5c08a6334 100644 --- a/pdns/dnswasher.cc +++ b/pdns/dnswasher.cc @@ -14,7 +14,6 @@ otherwise, obfuscate the response IP address #include "statbag.hh" #include "dnspcap.hh" -#include using namespace boost; using namespace std; @@ -52,8 +51,8 @@ try IPObfuscator ipo; while(pr.getUDPPacket()) { - if(ntohs(pr.d_udp->uh_dport)==53 || ntohs(pr.d_udp->uh_sport)==53 && pr.d_len > sizeof(HEADER)) { - HEADER* dh=(HEADER*)pr.d_payload; + 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; -- 2.40.0