Browse Source

smartdns: some minor fix

Nick Peng 2 years ago
parent
commit
7bf950c5f1
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/dns_server.c
  2. 1 1
      src/smartdns.c

+ 1 - 1
src/dns_server.c

@@ -467,7 +467,7 @@ static void _dns_server_set_dualstack_selection(struct dns_request *request)
 {
 	struct dns_rule_flags *rule_flag = NULL;
 
-	if (request->dualstack_selection_query || request->prefetch_expired_domain == 1) {
+	if (request->dualstack_selection_query || request->prefetch_expired_domain == 1 || is_ipv6_ready == 0) {
 		request->dualstack_selection = 0;
 		return;
 	}

+ 1 - 1
src/smartdns.c

@@ -388,7 +388,7 @@ static int _smartdns_create_cert(void)
 	int unused __attribute__((unused)) = 0;
 
 	if (get_uid_gid(&uid, &gid) != 0) {
-		return -1;
+		return 0;
 	}
 
 	unused = chown(dns_conf_bind_ca_file, uid, gid);