From 5e09b785939e0c1ab81d51f3c7924cb637956063 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 26 Jan 2016 19:05:39 +0100 Subject: [PATCH] Native return DNS NXDOMAIN instead of local host --- app/src/main/jni/netguard/netguard.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/jni/netguard/netguard.c b/app/src/main/jni/netguard/netguard.c index 0a7d6544..7f289b41 100644 --- a/app/src/main/jni/netguard/netguard.c +++ b/app/src/main/jni/netguard/netguard.c @@ -1337,6 +1337,11 @@ int check_domain(const struct arguments *args, const struct udp_session *u, else inet_pton(AF_INET6, "::1", addr); + // Experiment + rlen = datalen; + rh->rcode = 3; // NXDOMAIN + rh->ans_count = 0; + // Send response ssize_t res = write_udp(args, u, response, rlen);