cancel
Showing results for 
Search instead for 
Did you mean: 

DNS packets over TCP

FIXED
7up
Community Veteran
Posts: 15,829
Thanks: 1,583
Fixes: 17
Registered: ‎01-08-2007

DNS packets over TCP

Anyone here know anything about this?

My nameserver has been working just dandy via UDP for over a year - no real hassles there.

Decided i need to get it working via TCP too - like all nameservers should - and have discovered that the first two bytes in the stream are in fact the length of the stream - when it's a UDP packet it's the ID instead however with TCP it's preceded by the length.

So I've modified my nameserver to work with that (not really needed using indy sockets I just removed those two bytes) however when sending the reply via TCP the local machine successfully gets the reply (using nslookup and set vc) but the remote machine never gets it - and thats with the new length put in to preceed the XID and without it.

Even wireshark fails to see the packet which is odd.

Mook? lol

I need a new signature... i'm bored of the old one!
1 REPLY 1
7up
Community Veteran
Posts: 15,829
Thanks: 1,583
Fixes: 17
Registered: ‎01-08-2007

Re: DNS packets over TCP

Fix

Nevermind... I found it!

Length was just one byte out - screwing up nslookups ability to parse the returned data.

Sorted now and it works.

I need a new signature... i'm bored of the old one!