Browse Source

inet: fix getting the nameserver from _res state after res_init.

Fixes displaying the nameserver in busybox nslookup.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Felix Fietkau 11 years ago
parent
commit
60e5c34fe3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libc/inet/resolv.c

+ 1 - 1
libc/inet/resolv.c

@@ -3645,11 +3645,11 @@ res_init(void)
 	 */
 	if (!_res.id)
 		_res.id = res_randomid();
-	__res_sync = res_sync_func;
 
 	__UCLIBC_MUTEX_UNLOCK(__resolv_lock);
 
 	__res_vinit(&_res, 1);
+	__res_sync = res_sync_func;
 
 	return 0;
 }