News for hackers. Stuff that matters.
Re:A toy DNS resolver by tptacek on Tuesday February 01, 2022 @08:45PM (#30172443)
What do you think an "entire client connection" is? It's a read and a write from a net.Conn. Read client.go's (c *Client) exchange() (the lowercase one). It's 30 lines of code, and that includes stuff like EDNS0, TSIG, and read deadlines that have nothing to do with the functionality the author is demonstrating.

If the author took the time to write a 15 line roundTrip() function that called m.Pack(), udpConn.Write(), udpConn.SetDeadline(1s), and udpConn.Read(), would your argument here evaporate? Then it's not a very good argument, is it?

Re:A toy DNS resolver by BeefWellington on Tuesday February 01, 2022 @09:14PM (#30172694)
Opening a connection and performing parsing on record formats is the "heavy lifting" in this example.
Re:A toy DNS resolver by tptacek on Tuesday February 01, 2022 @09:26PM (#30172795)
Yes, we're clear on where the disagreement is between the two of us.