mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
inet: __inet6_scopeid_pton should accept node-local addresses [BZ #21657]
This commit is contained in:
parent
0a47d031e4
commit
f768b45020
@ -1,3 +1,10 @@
|
|||||||
|
2017-06-21 Benjamin Cama <b.cama@kerlink.fr>
|
||||||
|
|
||||||
|
[BZ #21657]
|
||||||
|
* inet/inet6_scopeid_pton.c (__inet6_scopeid_pton): Permit scopes
|
||||||
|
on node-local addresses.
|
||||||
|
* inet/tst-inet6_scopeid_pton.c (do_test): Adjust test.
|
||||||
|
|
||||||
2017-06-21 Florian Weimer <fweimer@redhat.com>
|
2017-06-21 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
* intl/loadmsgcat.c: Remove alloca support.
|
* intl/loadmsgcat.c: Remove alloca support.
|
||||||
|
@ -33,6 +33,7 @@ __inet6_scopeid_pton (const struct in6_addr *address, const char *scope,
|
|||||||
uint32_t *result)
|
uint32_t *result)
|
||||||
{
|
{
|
||||||
if (IN6_IS_ADDR_LINKLOCAL (address)
|
if (IN6_IS_ADDR_LINKLOCAL (address)
|
||||||
|
|| IN6_IS_ADDR_MC_NODELOCAL (address)
|
||||||
|| IN6_IS_ADDR_MC_LINKLOCAL (address))
|
|| IN6_IS_ADDR_MC_LINKLOCAL (address))
|
||||||
{
|
{
|
||||||
uint32_t number = __if_nametoindex (scope);
|
uint32_t number = __if_nametoindex (scope);
|
||||||
|
@ -218,9 +218,9 @@ do_test (void)
|
|||||||
{
|
{
|
||||||
expect_success ("fe80::1", interface_name, interface_index);
|
expect_success ("fe80::1", interface_name, interface_index);
|
||||||
expect_success ("ff02::1", interface_name, interface_index);
|
expect_success ("ff02::1", interface_name, interface_index);
|
||||||
|
expect_success ("ff01::1", interface_name, interface_index);
|
||||||
expect_failure ("::", interface_name);
|
expect_failure ("::", interface_name);
|
||||||
expect_failure ("::1", interface_name);
|
expect_failure ("::1", interface_name);
|
||||||
expect_failure ("ff01::1", interface_name);
|
|
||||||
expect_failure ("2001:db8::1", interface_name);
|
expect_failure ("2001:db8::1", interface_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user