#YC9 dns: bad rdata

I have gone through all the tickets with same issue but i wasn’t able to find any help with those so i am creating a new topic.

Here what i am doing is parsing the email from dns request and generate a response in format [header q1 q2 a1 a2]…but it is showing header overflow

Below everything is in bytes so it will be more clear,

request : [61 174 1 0 0 2 0 0 0 0 0 0 3 97 98 99 17 108 111 110 103 97 115 115 100 111 109 97 105 110 110 97 109 101 3 99 111 109 0 0 1 0 1 3 100 101 102 192 16 0 1 0 1]

so we can extract data:
req header: [61 174 1 0 0 2 0 0 0 0 0 0]
req questions : [3 97 98 99 17 108 111 110 103 97 115 115 100 111 109 97 105 110 110 97 109 101 3 99 111 109 0 0 1 0 1 3 100 101 102 192 16 0 1 0 1]

my response: [61 174 129 0 0 2 0 2 0 0 0 0 3 97 98 99 17 108 111 110 103 97 115 115 100 111 109 97 105 110 110 97 109 101 3 99 111 109 0 0 1 0 1 3 100 101 102 17 108 111 110 103 97 115 115 100 111 109 97 105 110 110 97 109 101 3 99 111 109 0 0 1 0 1 3 97 98 99 17 108 111 110 103 97 115 115 100 111 109 97 105 110 110 97 109 101 3 99 111 109 0 0 1 0 1 0 0 0 60 0 4 0 0 0 0 8 8 8 8 3 100 101 102 17 108 111 110 103 97 115 115 100 111 109 97 105 110 110 97 109 101 3 99 111 109 0 0 1 0 1 0 0 0 60 0 4 0 0 0 0 8 8 8 8]

so the response header is : [61 174 129 0 0 2 0 2 0 0 0 0]
response questions9(1 & 2):[3 97 98 99 17 108 111 110 103 97 115 115 100 111 109 97 105 110 110 97 109 101 3 99 111 109 0 0 1 0 1 3 100 101 102 17 108 111 110 103 97 115 115 100 111 109 97 105 110 110 97 109 101 3 99 111 109 0 0 1 0 1]

response answer : [3 97 98 99 17 108 111 110 103 97 115 115 100 111 109 97 105 110 110 97 109 101 3 99 111 109 0 0 1 0 1 0 0 0 60 0 4 0 0 0 0 8 8 8 8 3 100 101 102 17 108 111 110 103 97 115 115 100 111 109 97 105 110 110 97 109 101 3 99 111 109 0 0 1 0 1 0 0 0 60 0 4 0 0 0 0 8 8 8 8]

everything seems correct but it is saying “DNS query failed: dns: bad rdata.
[tester::#YC9] If you are seeing this after a while then it is likely that your server is not responding with appropriate id
[tester::#YC9] Test failed”

need help…

github: GitHub - AnkurTiwari21/dns-in-go

just removed the part where i was setting rdata and it ran…but in the previous tasks we have test for checking answer right? so why this didnt occured there

Hi @ankur12345678, looks like you’ve already solved the problem. Let me know if you still need any assistance.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.