summaryrefslogtreecommitdiff
path: root/src/dnsproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dnsproxy.c')
-rwxr-xr-xsrc/dnsproxy.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index cb583251..b244a02e 100755
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -510,22 +510,30 @@ static void send_response(int sk, unsigned char *buf, size_t len,
return;
hdr = (void *) (buf + offset);
+#if !defined TIZEN_EXT
if (offset) {
buf[0] = 0;
buf[1] = sizeof(*hdr);
}
+#endif
debug("id 0x%04x qr %d opcode %d", hdr->id, hdr->qr, hdr->opcode);
hdr->qr = 1;
hdr->rcode = ns_r_servfail;
+#if !defined TIZEN_EXT
hdr->qdcount = 0;
+#endif
hdr->ancount = 0;
hdr->nscount = 0;
hdr->arcount = 0;
+#if defined TIZEN_EXT
+ err = sendto(sk, buf, len, MSG_NOSIGNAL, to, tolen);
+#else
err = sendto(sk, buf, sizeof(*hdr) + offset, MSG_NOSIGNAL, to, tolen);
+#endif
if (err < 0) {
connman_error("Failed to send DNS response to %d: %s",
sk, strerror(errno));