When PowerDNS pulls replies from the cache for TCP replies, it swaps the order of the query-id in the reply packet. This is good for little-endian systems (like x86) but not for big-endian systems (like Sparc).
When you "dig" against such systems, you will get errors like this:
shane@julian:~> dig +short +norec +time=1 +tries=1 +retry=0 +tcp @22.214.171.124 -p 5550 -c IN -t SOA -q foo.bar
;; ERROR: ID mismatch: expected ID 63666, got 45816
The attached patch fixes that problem.
Attachment '' (tcp-qid.diff) https://gist.github.com/5466657
Fixed differently in 1346 - the whole concept of spoofID proved to be wrong.