generated from codecrafters-io/course-template
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
[stage-7] Running tests for Stage #7: Parse compressed packet
[stage-7] DNS resolver listening on 127.0.0.1:5354
[stage-7] Starting DNS server on 127.0.0.1:2053
[stage-7] Running program
[stage-7] Connecting to 127.0.0.1:2053 using UDP
[your_program] Logs from your program will appear here!
[stage-7] Querying the following in the same request (Messages with >> prefix are part of this log)
[stage-7] >> ;abc.longassdomainname.com. IN A
[stage-7] >> ;def.longassdomainname.com. IN A
[stage-7] Sending Request: (Messages with >>> prefix are part of this log)
[stage-7] >>> ;; opcode: QUERY, status: NOERROR, id: 19542
[stage-7] >>> ;; flags: rd; QUERY: 2, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
[stage-7] >>>
[stage-7] >>> ;; QUESTION SECTION:
[stage-7] >>> ;abc.longassdomainname.com. IN A
[stage-7] >>> ;def.longassdomainname.com. IN A
[stage-7] >>>
[your_program] 2024/01/28 16:45:33 Received 33 bytes from 127.0.0.1:43902: parsed header: &dns.Header{ID:0xb3cc, Compacted:dns.Compacted{QR:true, OPCODE:0x0, AA:false, TC:false, RD:true, RA:false, Z:0, RCODE:0x0}, QDCOUNT:0x1, ANCOUNT:0x0, NSCOUNT:0x0, ARCOUNT:0x0}, questions:[]dns.Question{dns.Question{Name:"codecrafters.io", Type:0x1, Class:0x1}}
[your_program] 2024/01/28 16:45:33 HeaderID: 46028
[your_program] 2024/01/28 16:45:33 Preparing answer for question dns.Question{Name:"codecrafters.io", Type:0x1, Class:0x1}
[stage-7] DNS query failed: dns: overflow unpacking uint16.
[stage-7] If you are seeing this after a while then it is likely that your server is not responding with appropriate id
[stage-7] Test failed
[stage-7] Terminating program
[stage-7] Shutting down DNS resolver server...
[your_program] 2024/01/28 16:45:33 Answer is dns.Answer{Name:"codecrafters.io", Type:0x1, Class:0x1, TTL:0x3c, Length:0x4, Data:0x4020301}
[your_program] 2024/01/28 16:45:33 Received 53 bytes from 127.0.0.1:51659: parsed header: &dns.Header{ID:0x4c56, Compacted:dns.Compacted{QR:true, OPCODE:0x0, AA:false, TC:false, RD:true, RA:false, Z:0, RCODE:0x0}, QDCOUNT:0x2, ANCOUNT:0x0, NSCOUNT:0x0, ARCOUNT:0x0}, questions:[]dns.Question{dns.Question{Name:"abc.longassdomainname.com", Type:0x1, Class:0x1}, dns.Question{Name:"def.longassdomainname.com", Type:0x1, Class:0x1}}
[your_program] 2024/01/28 16:45:33 HeaderID: 19542
[your_program] 2024/01/28 16:45:33 Preparing answer for question dns.Question{Name:"abc.longassdomainname.com", Type:0x1, Class:0x1}
[your_program] 2024/01/28 16:45:33 Answer is dns.Answer{Name:"abc.longassdomainname.com", Type:0x1, Class:0x1, TTL:0x3c, Length:0x4, Data:0x4020301}
[your_program] 2024/01/28 16:45:33 Preparing answer for question dns.Question{Name:"def.longassdomainname.com", Type:0x1, Class:0x1}
[your_program] 2024/01/28 16:45:33 Answer is dns.Answer{Name:"def.longassdomainname.com", Type:0x1, Class:0x1, TTL:0x3c, Length:0x4, Data:0x4020301}
[stage-7] Program terminated successfully
Error message isn't clear. Response header ID is correct because previous stages pass.
Metadata
Metadata
Assignees
Labels
No labels