1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

* sysdeps/posix/getaddrinfo.c (rfc3484_sort): Implement rule 4,

home addresses.
	* sysdeps/unix/sysv/linux/check_pf.c (make_request): Recognize
	IFA_F_HOMEADDRESS flag for interfaces.
	* include/ifaddrs.h (struct in6addrinfo): Define
	in6ai_homeaddress.
This commit is contained in:
Ulrich Drepper
2006-09-24 17:14:11 +00:00
parent 4a132246b1
commit 457b559e2e
7 changed files with 42 additions and 9 deletions

View File

@ -38,6 +38,9 @@
#ifndef IFA_F_TEMPORARY
# define IFA_F_TEMPORARY IFA_F_SECONDARY
#endif
#ifndef IFA_F_HOMEADDRESS
# define IFA_F_HOMEADDRESS 0
#endif
static int
@ -124,7 +127,9 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
case AF_INET6:
*seen_ipv6 = true;
if (ifam->ifa_flags & (IFA_F_DEPRECATED | IFA_F_TEMPORARY))
if (ifam->ifa_flags & (IFA_F_DEPRECATED
| IFA_F_TEMPORARY
| IFA_F_HOMEADDRESS))
{
struct rtattr *rta = IFA_RTA (ifam);
size_t len = (nlmh->nlmsg_len
@ -152,7 +157,10 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
? in6ai_deprecated : 0)
| ((ifam->ifa_flags
& IFA_F_TEMPORARY)
? in6ai_temporary : 0));
? in6ai_temporary : 0)
| ((ifam->ifa_flags
& IFA_F_HOMEADDRESS)
? in6ai_homeaddress : 0));
memcpy (newp->info.addr, address ?: local,
sizeof (newp->info.addr));
newp->next = in6ailist;