]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/glibc/glibc-rh928318.patch
Merge remote-tracking branch 'alfh/feature_firewalllog_first_last' into next
[people/teissler/ipfire-2.x.git] / src / patches / glibc / glibc-rh928318.patch
1 diff --git a/resolv/res_init.c b/resolv/res_init.c
2 index 40dbe7d..202569d 100644
3 --- a/resolv/res_init.c
4 +++ b/resolv/res_init.c
5 @@ -176,13 +176,6 @@ __res_vinit(res_state statp, int preinit) {
6 statp->id = res_randomid();
7 }
8
9 -#ifdef USELOOPBACK
10 - statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
11 -#else
12 - statp->nsaddr.sin_addr.s_addr = INADDR_ANY;
13 -#endif
14 - statp->nsaddr.sin_family = AF_INET;
15 - statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
16 statp->nscount = 0;
17 statp->ndots = 1;
18 statp->pfcode = 0;
19 @@ -433,6 +426,12 @@ __res_vinit(res_state statp, int preinit) {
20 #endif
21 (void) fclose(fp);
22 }
23 + if (__builtin_expect(statp->nscount == 0, 0)) {
24 + statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
25 + statp->nsaddr.sin_family = AF_INET;
26 + statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
27 + statp->nscount = 1;
28 + }
29 if (statp->defdname[0] == 0 &&
30 __gethostname(buf, sizeof(statp->defdname) - 1) == 0 &&
31 (cp = strchr(buf, '.')) != NULL)