diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-10-31 01:51:16 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-10-31 01:51:16 -0400 |
commit | 3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6 (patch) | |
tree | de7827ff96076cb4d181ed781c418601906fa772 /sysdeps/posix | |
parent | 636064eb4c03397c86aa26e489e68f952bd5e53f (diff) | |
download | glibc-3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6.tar.gz glibc-3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6.tar.xz glibc-3a2c02424d9824f5cdea4ebd32ff929b2b1f49c6.zip |
Cache network interface information
Whenever getaddrinfo needed network interface information it used the netlink interface to read the information every single time. The problem is that this information can change at any time. The patch implements monitoring of the network interfaces through nscd. If no change is detected the previously read information can be reused (which is the norm). This timestamp information is also made available to other processes using the shared memory segment between nscd and those processes.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r-- | sysdeps/posix/getaddrinfo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index a5aafe93ac..216c9cce5f 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -2386,7 +2386,7 @@ getaddrinfo (const char *name, const char *service, || (hints->ai_family == PF_INET6 && ! seen_ipv6)) { /* We cannot possibly return a valid answer. */ - free (in6ai); + __free_in6ai (in6ai); return EAI_NONAME; } } @@ -2400,7 +2400,7 @@ getaddrinfo (const char *name, const char *service, { if (hints->ai_flags & AI_NUMERICSERV) { - free (in6ai); + __free_in6ai (in6ai); return EAI_NONAME; } @@ -2422,7 +2422,7 @@ getaddrinfo (const char *name, const char *service, if (last_i != 0) { freeaddrinfo (p); - free (in6ai); + __free_in6ai (in6ai); return -(last_i & GAIH_EAI); } @@ -2434,7 +2434,7 @@ getaddrinfo (const char *name, const char *service, } else { - free (in6ai); + __free_in6ai (in6ai); return EAI_FAMILY; } @@ -2622,7 +2622,7 @@ getaddrinfo (const char *name, const char *service, p->ai_canonname = canonname; } - free (in6ai); + __free_in6ai (in6ai); if (p) { |