On Mon, 2009-12-14 at 03:33 +0100, Marcel Holtmann wrote:
> 
> >                       err = send(sk, alt, altlen + 12 + 4, 0);
> 
> I removed the + 12 in the send command since you did add it earlier
> already. 

Sorry, forgot to change the length. But that '+ 12' was actually correct
for EDNS0 requests, purely by accident. As well as being the length of
the start of the packet (up to the query label), it is _also_, by
coincidence, the length of the OPT record which lives at the end of the
packet in an EDNS0 request. This is the saner fix though:

-                       err = send(sk, alt, altlen + 12 + 4, 0);
+                       err = send(sk, alt, len + strlen(data->domain) + 1, 0);


-- 
dwmw2

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to