twisted.names.server.DNSServerFactory sends the clients OPT records back in NXDOMAIN responses
|Reported by:||rwall||Owned by:||rwall|
branch-diff, diff-cov, branch-cov, buildbot
twisted.names.server.DNSServerFactory uses the original query message in its response.
When there is an answer, it resets the original answers, authority, and additional lists.
But when responding with NXDOMAIN it leaves the original query lists.
If the query contained special OPT records, then these get sent back to the client giving the impression that server supports the same EDNS version as the client....which it doesn't...yet (wiki:EDNS0)
Instead, it should remove the OPT records before replying.
Need to check RFCs to see if the other records should be left in place or not.
$ dig @ns1.twistedmatrix.com. foobar.twistedmatrix.com A +norecurse ; <<>> DiG 9.9.3-rl.156.01-P1-RedHat-9.9.3-3.P1.fc19 <<>> @ns1.twistedmatrix.com. foobar.twistedmatrix.com A +norecurse ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 2260 ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;foobar.twistedmatrix.com. IN A ;; Query time: 153 msec ;; SERVER: 220.127.116.11#53(18.104.22.168) ;; WHEN: Sat Jul 27 14:11:11 BST 2013 ;; MSG SIZE rcvd: 53
Change History (10)
comment:4 Changed 3 years ago by rwall
- Branch changed from branches/clean-response-message-6645 to branches/clean-response-message-6645-2
comment:5 Changed 3 years ago by rwall
- Keywords review added
- Owner rwall deleted
- Status changed from assigned to new
Changed 3 years ago by rwall
comment:8 in reply to: ↑ 7 Changed 3 years ago by rwall
- Owner set to rwall
- Status changed from new to assigned