DNSCrypt / dnscrypt-protocol

DNSCrypt protocol specification

Home Page:https://dnscrypt.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

reklatsmasters opened this issue · comments

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.

I went through the same issue ;-)

Thanks!