소스 검색

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 년 전
부모
커밋
60e5c34fe3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;
 }