pdns auth from svn sends truncated oversized responses for every query but the first #200

Closed
Habbie opened this Issue Apr 26, 2013 · 3 comments

Projects

None yet

1 participant

@Habbie
Member
Habbie commented Apr 26, 2013

Oversized UDP responses (EDNS) get truncated for every query after the first query.

Observed with SVN Revision: 1263

System/PowerDNS Info:

[ch@monique~/pdns%] uname -a
Linux monique 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686 GNU/Linux
[ch@monique~/pdns%] cat run
./pdns/pdns_server --launch=gmysql --local-port=5353 --socket-dir=/home/ch/pdns/ --gmysql-user=root --gmysql-dbname=pdns
[ch@monique~/pdns%] sh ./run
Sep 09 21:30:23 Reading random entropy from '/dev/urandom'
Sep 09 21:30:23 This is a standalone pdns
Sep 09 21:30:23 Listening on controlsocket in '/home/ch/pdns/pdns.controlsocket'
Sep 09 21:30:23 It is advised to bind to explicit addresses with the --local-address option
Sep 09 21:30:23 UDP server bound to 0.0.0.0:5353
Sep 09 21:30:23 TCP server bound to 0.0.0.0:5353
Sep 09 21:30:23 PowerDNS 2.9.22-snapshot (C) 2001-2007 PowerDNS.COM BV (Sep  9 2008, 21:26:03, gcc 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) starting up
Sep 09 21:30:23 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
Sep 09 21:30:23 Creating backend connection for TCP
Sep 09 21:30:23 gmysql Connection succesful
Sep 09 21:30:23 About to create 3 backend threads for UDP
Sep 09 21:30:23 gmysql Connection succesful
Sep 09 21:30:23 gmysql Connection succesful
Sep 09 21:30:23 gmysql Connection succesful
Sep 09 21:30:53 gmysql Connection succesful
Sep 09 21:30:53 Not authoritative for '', sending servfail to 127.0.0.1 (recursion was desired)
dig -p 5353 @localhost longtestdomainname.at A +notcp +edns=0 +bufsize=4096
;; Warning: Message parser reports malformed message packet.
;; Truncated, retrying in TCP mode.
;; <<>> DiG 9.4.2-P1 <<>> -p 5353 @localhost longtestdomainname.at A +notcp +edns=0 +bufsize=4096
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62311
;; flags: qr aa rd; QUERY: 1, ANSWER: 71, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;longtestdomainname.at.     IN  A

;; ANSWER SECTION:
longtestdomainname.at.  10200   IN  A   127.127.127.127
longtestdomainname.at.  10200   IN  A   127.127.127.1
longtestdomainname.at.  10200   IN  A   127.127.127.2
longtestdomainname.at.  10200   IN  A   127.127.127.3
longtestdomainname.at.  10200   IN  A   127.127.127.4
longtestdomainname.at.  10200   IN  A   127.127.127.5
longtestdomainname.at.  10200   IN  A   127.127.127.6
longtestdomainname.at.  10200   IN  A   127.127.127.7
longtestdomainname.at.  10200   IN  A   127.127.127.8
longtestdomainname.at.  10200   IN  A   127.127.127.9
longtestdomainname.at.  10200   IN  A   127.127.127.10
longtestdomainname.at.  10200   IN  A   127.127.127.11
longtestdomainname.at.  10200   IN  A   127.127.127.12
longtestdomainname.at.  10200   IN  A   127.127.127.13
longtestdomainname.at.  10200   IN  A   127.127.127.14
longtestdomainname.at.  10200   IN  A   127.127.127.15
longtestdomainname.at.  10200   IN  A   127.127.127.16
longtestdomainname.at.  10200   IN  A   127.127.127.17
longtestdomainname.at.  10200   IN  A   127.127.127.18
longtestdomainname.at.  10200   IN  A   127.127.127.19
longtestdomainname.at.  10200   IN  A   127.127.127.20
longtestdomainname.at.  10200   IN  A   127.127.127.21
longtestdomainname.at.  10200   IN  A   127.127.127.22
longtestdomainname.at.  10200   IN  A   127.127.127.23
longtestdomainname.at.  10200   IN  A   127.127.127.24
longtestdomainname.at.  10200   IN  A   127.127.127.25
longtestdomainname.at.  10200   IN  A   127.127.127.26
longtestdomainname.at.  10200   IN  A   127.127.127.27
longtestdomainname.at.  10200   IN  A   127.127.127.28
longtestdomainname.at.  10200   IN  A   127.127.127.29
longtestdomainname.at.  10200   IN  A   127.127.127.30
longtestdomainname.at.  10200   IN  A   127.127.127.31
longtestdomainname.at.  10200   IN  A   127.127.127.32
longtestdomainname.at.  10200   IN  A   127.127.127.33
longtestdomainname.at.  10200   IN  A   127.127.127.34
longtestdomainname.at.  10200   IN  A   127.127.127.35
longtestdomainname.at.  10200   IN  A   127.127.127.36
longtestdomainname.at.  10200   IN  A   127.127.127.37
longtestdomainname.at.  10200   IN  A   127.127.127.38
longtestdomainname.at.  10200   IN  A   127.127.127.39
longtestdomainname.at.  10200   IN  A   127.127.127.40
longtestdomainname.at.  10200   IN  A   127.127.127.41
longtestdomainname.at.  10200   IN  A   127.127.127.42
longtestdomainname.at.  10200   IN  A   127.127.127.43
longtestdomainname.at.  10200   IN  A   127.127.127.44
longtestdomainname.at.  10200   IN  A   127.127.127.45
longtestdomainname.at.  10200   IN  A   127.127.127.46
longtestdomainname.at.  10200   IN  A   127.127.127.47
longtestdomainname.at.  10200   IN  A   127.127.127.48
longtestdomainname.at.  10200   IN  A   127.127.127.49
longtestdomainname.at.  10200   IN  A   127.127.127.50
longtestdomainname.at.  10200   IN  A   127.127.127.51
longtestdomainname.at.  10200   IN  A   127.127.127.52
longtestdomainname.at.  10200   IN  A   127.127.127.53
longtestdomainname.at.  10200   IN  A   127.127.127.54
longtestdomainname.at.  10200   IN  A   127.127.127.55
longtestdomainname.at.  10200   IN  A   127.127.127.56
longtestdomainname.at.  10200   IN  A   127.127.127.57
longtestdomainname.at.  10200   IN  A   127.127.127.58
longtestdomainname.at.  10200   IN  A   127.127.127.59
longtestdomainname.at.  10200   IN  A   127.127.127.60
longtestdomainname.at.  10200   IN  A   127.127.127.61
longtestdomainname.at.  10200   IN  A   127.127.127.62
longtestdomainname.at.  10200   IN  A   127.127.127.63
longtestdomainname.at.  10200   IN  A   127.127.127.64
longtestdomainname.at.  10200   IN  A   127.127.127.65
longtestdomainname.at.  10200   IN  A   127.127.127.66
longtestdomainname.at.  10200   IN  A   127.127.127.67
longtestdomainname.at.  10200   IN  A   127.127.127.68
longtestdomainname.at.  10200   IN  A   127.127.127.69
longtestdomainname.at.  10200   IN  A   127.127.127.70

;; Query time: 2 msec
;; SERVER: 127.0.0.1#5353(127.0.0.1)
;; WHEN: Tue Sep  9 21:59:11 2008
;; MSG SIZE  rcvd: 1175

test data created using:

for i in `seq 1 70`; do echo "insert into records(domain_id,name,type,content,ttl,prio) values ('3','longtestdomainname.at','A','127.127.127.$i',10200,0);"; done | mysql -uroot pdns

Also happens with only 50 or 30 records.

@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie
Member
Habbie commented Apr 26, 2013

Author: ahu
Fixed in cs 1281, thanks!

@Habbie
Member
Habbie commented Apr 26, 2013

Author: anon
This is still happening for us on the latest PowerDNS (2.9.22) with the latest recursor (3.3) available from the PowerDNS website.

@Habbie
Member
Habbie commented Apr 26, 2013

Author: ahu
fixed in commit 1830

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment