After I added a flag to my program for gt1 I see the tests for previous stage yc9 is failing. After debugging I found that stage yc9 is also passing the resolver flag and when my program queries the resolver with the give message resolver gives wrong response hence my program returns the wrong response.
Wierd enough I added an if to force skipping the resolver flag for that state but I don’t get it why it’s failing.
Adding this line to check if we are in the yc9 stage and not using the resolver fixed the issue:
Here are my logs that show the resolver response is empty.
[tester::#YC9] Querying the following in the same request (Messages with >> prefix are part of this log)
[tester::#YC9] >> ;abc.longassdomainname.com. IN A
[tester::#YC9] >> ;def.longassdomainname.com. IN A
[tester::#YC9] Sending Request: (Messages with >>> prefix are part of this log)
[tester::#YC9] >>> ;; opcode: QUERY, status: NOERROR, id: 35874
[tester::#YC9] >>> ;; flags: rd; QUERY: 2, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
[tester::#YC9] >>>
[tester::#YC9] >>> ;; QUESTION SECTION:
[tester::#YC9] >>> ;abc.longassdomainname.com. IN A
[tester::#YC9] >>> ;def.longassdomainname.com. IN A
[tester::#YC9] >>>
[your_program] Received 53 bytes from 127.0.0.1:39444
[your_program] incoming dns Message: {Header:{Id:35874 QueryResponse:false Opcode:0 AuthoritativeAnswer:false TruncatedMessage:false RecursionDesired:true RecursionAvailable:false Reserved:0 ResponseCode:0 QuestionCount:2 AnswerCount:0 AuthorityCount:0 AdditionalCount:0} Questions:[{Name:[abc longassdomainname com] Type:1 Class:1} {Name:[def longassdomainname com] Type:1 Class:1}] Answers:[]}
[your_program] resolving using the address
[your_program] Resolver response: {Header:{Id:35874 QueryResponse:true Opcode:0 AuthoritativeAnswer:false TruncatedMessage:false RecursionDesired:true RecursionAvailable:false Reserved:0 ResponseCode:0 QuestionCount:0 AnswerCount:0 AuthorityCount:0 AdditionalCount:0} Questions:[] Answers:[]}
[your_program] Own response: {Header:{Id:35874 QueryResponse:true Opcode:0 AuthoritativeAnswer:false TruncatedMessage:false RecursionDesired:true RecursionAvailable:false Reserved:0 ResponseCode:0 QuestionCount:2 AnswerCount:2 AuthorityCount:0 AdditionalCount:0} Questions:[{Name:[abc longassdomainname com] Type:1 Class:1} {Name:[def longassdomainname com] Type:1 Class:1}] Answers:[]}
[tester::#YC9] Received Response: (Messages with >>> prefix are part of this log)
[tester::#YC9] >>> ;; opcode: QUERY, status: NOERROR, id: 35874
[tester::#YC9] >>> ;; flags: qr rd ra; QUERY: 2, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
[tester::#YC9] >>>
[tester::#YC9] >>> ;; QUESTION SECTION:
[tester::#YC9] >>> ;abc.longassdomainname.com. IN A
[tester::#YC9] >>> ;def.longassdomainname.com. IN A
[tester::#YC9] >>>
[tester::#YC9] Expected answer section to have 2 entries got 0
[tester::#YC9] Test failed
[tester::#YC9] Terminating program
[tester::#YC9] Shutting down DNS resolver server...
[tester::#YC9] Program terminated successfully
Could you help me understand if my code should call the resolver for stage yc9 or not? I thought maybe after the forwarding server there is a new test case for yc9 and I’m failing but this seems like the old test case requiring the old behavior.
Thanks.