Fix DNS packet length calculation
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 15 Dec 2009 16:17:54 +0000 (08:17 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 15 Dec 2009 16:17:54 +0000 (08:17 -0800)
plugins/dnsproxy.c

index 40426c6ead3fc97904543eb9e06c733a3b502697..e8d13b5764519c6aeea18b5cc82a694e3c627a08 100644 (file)
@@ -672,7 +672,7 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
                        memcpy(alt + altlen, buf + altlen - domlen,
                                                        len - altlen + domlen);
 
-                       err = send(sk, alt, altlen + 4, 0);
+                       err = send(sk, alt, len + domlen + 1, 0);
 
                        req->numserv++;
                }