DNSCrypt / dnscrypt-protocol

DNSCrypt protocol specification
https://dnscrypt.info
Other
136 stars 40 forks source link

spec error: tcp length prefix encoded as bigendian instead of little endian #5

Closed reklatsmasters closed 1 year ago

reklatsmasters commented 4 years ago

Spec says:

Client queries over TCP only differ from queries sent over UDP by the padding length computation and by the fact that they are prefixed with their length, encoded as two little-endian bytes.

But tcp length actualy encoded as big endian!

https://github.com/jedisct1/encrypted-dns-server/blob/641ba88ab1fd635524aee47afbba5887c52e1438/src/resolver.rs#L149-L152

I spend a hours to understand why i don't get response from server over tcp.

alex14fr commented 2 years ago

I went through the same issue ;-)

jedisct1 commented 1 year ago

Thanks!