* 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:
parent
4a132246b1
commit
457b559e2e
|
@ -1,3 +1,12 @@
|
||||||
|
2006-09-24 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2006-09-21 Jakub Jelinek <jakub@redhat.com>
|
2006-09-21 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
[BZ #3225]
|
[BZ #3225]
|
||||||
|
|
7
NEWS
7
NEWS
|
@ -1,4 +1,4 @@
|
||||||
GNU C Library NEWS -- history of user-visible changes. 2006-08-14
|
GNU C Library NEWS -- history of user-visible changes. 2006-09-24
|
||||||
Copyright (C) 1992-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
|
Copyright (C) 1992-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
|
||||||
See the end for copying conditions.
|
See the end for copying conditions.
|
||||||
|
|
||||||
|
@ -8,7 +8,8 @@ using `glibc' in the "product" field.
|
||||||
Version 2.5
|
Version 2.5
|
||||||
|
|
||||||
* For Linux, the sorting of addresses returned by getaddrinfo now also
|
* For Linux, the sorting of addresses returned by getaddrinfo now also
|
||||||
handles rules 3 and 7 from RFC 3484. Implemented by Ulrich Drepper.
|
handles rules 3, 4, and 7 from RFC 3484. I.e., all rules are handled.
|
||||||
|
Implemented by Ulrich Drepper.
|
||||||
|
|
||||||
* Allow system admin to configure getaddrinfo with the /etc/gai.conf file.
|
* Allow system admin to configure getaddrinfo with the /etc/gai.conf file.
|
||||||
Implemented by Ulrich Drepper.
|
Implemented by Ulrich Drepper.
|
||||||
|
@ -20,7 +21,7 @@ Version 2.5
|
||||||
* For sites with broken group and/or passwd database, the auto-propagate
|
* For sites with broken group and/or passwd database, the auto-propagate
|
||||||
option of nscd can prevent creating ID lookup entries from the results
|
option of nscd can prevent creating ID lookup entries from the results
|
||||||
of a name lookup and vice versa. This usually is no problem but some
|
of a name lookup and vice versa. This usually is no problem but some
|
||||||
site might have problems with default behavior.
|
site might have problems with the default behavior.
|
||||||
Implemented by Ulrich Drepper.
|
Implemented by Ulrich Drepper.
|
||||||
|
|
||||||
* Iterating over entire database in NIS can be slow. With the
|
* Iterating over entire database in NIS can be slow. With the
|
||||||
|
|
|
@ -10,7 +10,8 @@ struct in6addrinfo
|
||||||
{
|
{
|
||||||
enum {
|
enum {
|
||||||
in6ai_deprecated = 1,
|
in6ai_deprecated = 1,
|
||||||
in6ai_temporary = 2
|
in6ai_temporary = 2,
|
||||||
|
in6ai_homeaddress = 4
|
||||||
} flags;
|
} flags;
|
||||||
uint32_t addr[4];
|
uint32_t addr[4];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2006-09-24 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[BZ #3251]
|
||||||
|
* descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
|
||||||
|
Patch by Petr Baudis.
|
||||||
|
|
||||||
2006-09-18 Jakub Jelinek <jakub@redhat.com>
|
2006-09-18 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* tst-kill4.c (do_test): Explicitly set tf thread's stack size.
|
* tst-kill4.c (do_test): Explicitly set tf thread's stack size.
|
||||||
|
|
|
@ -201,7 +201,7 @@ struct pthread
|
||||||
mutex->__data.__list.__next \
|
mutex->__data.__list.__next \
|
||||||
= THREAD_GETMEM (THREAD_SELF, robust_list.__next); \
|
= THREAD_GETMEM (THREAD_SELF, robust_list.__next); \
|
||||||
THREAD_SETMEM (THREAD_SELF, robust_list.__next, \
|
THREAD_SETMEM (THREAD_SELF, robust_list.__next, \
|
||||||
((uintptr_t) &mutex->__data.__list) | val); \
|
(void *) (((uintptr_t) &mutex->__data.__list) | val)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
# define DEQUEUE_MUTEX(mutex) \
|
# define DEQUEUE_MUTEX(mutex) \
|
||||||
do { \
|
do { \
|
||||||
|
|
|
@ -1390,8 +1390,16 @@ rfc3484_sort (const void *p1, const void *p2)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Rule 4: Prefer home addresses.
|
/* Rule 4: Prefer home addresses. */
|
||||||
Another thing only the kernel can decide. */
|
if (a1->got_source_addr)
|
||||||
|
{
|
||||||
|
if (!(a1->source_addr_flags & in6ai_homeaddress)
|
||||||
|
&& (a2->source_addr_flags & in6ai_homeaddress))
|
||||||
|
return -1;
|
||||||
|
if ((a1->source_addr_flags & in6ai_homeaddress)
|
||||||
|
&& !(a2->source_addr_flags & in6ai_homeaddress))
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Rule 5: Prefer matching label. */
|
/* Rule 5: Prefer matching label. */
|
||||||
if (a1->got_source_addr)
|
if (a1->got_source_addr)
|
||||||
|
|
|
@ -38,6 +38,9 @@
|
||||||
#ifndef IFA_F_TEMPORARY
|
#ifndef IFA_F_TEMPORARY
|
||||||
# define IFA_F_TEMPORARY IFA_F_SECONDARY
|
# define IFA_F_TEMPORARY IFA_F_SECONDARY
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef IFA_F_HOMEADDRESS
|
||||||
|
# define IFA_F_HOMEADDRESS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -124,7 +127,9 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
*seen_ipv6 = true;
|
*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);
|
struct rtattr *rta = IFA_RTA (ifam);
|
||||||
size_t len = (nlmh->nlmsg_len
|
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)
|
? in6ai_deprecated : 0)
|
||||||
| ((ifam->ifa_flags
|
| ((ifam->ifa_flags
|
||||||
& IFA_F_TEMPORARY)
|
& IFA_F_TEMPORARY)
|
||||||
? in6ai_temporary : 0));
|
? in6ai_temporary : 0)
|
||||||
|
| ((ifam->ifa_flags
|
||||||
|
& IFA_F_HOMEADDRESS)
|
||||||
|
? in6ai_homeaddress : 0));
|
||||||
memcpy (newp->info.addr, address ?: local,
|
memcpy (newp->info.addr, address ?: local,
|
||||||
sizeof (newp->info.addr));
|
sizeof (newp->info.addr));
|
||||||
newp->next = in6ailist;
|
newp->next = in6ailist;
|
||||||
|
|
Loading…
Reference in New Issue