From: Benjamin Cama Date: Thu, 22 Jun 2017 13:49:28 +0000 (+0200) Subject: inet: __inet6_scopeid_pton should accept node-local addresses [BZ #21657] X-Git-Tag: glibc-2.26~277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f768b450204f54b080ea5dc5c2071940604b424c;p=thirdparty%2Fglibc.git inet: __inet6_scopeid_pton should accept node-local addresses [BZ #21657] --- diff --git a/ChangeLog b/ChangeLog index 46a70ff7ced..72ab9bed636 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-06-21 Benjamin Cama + + [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 * intl/loadmsgcat.c: Remove alloca support. diff --git a/inet/inet6_scopeid_pton.c b/inet/inet6_scopeid_pton.c index f842ffcadb3..e09b1cb34dc 100644 --- a/inet/inet6_scopeid_pton.c +++ b/inet/inet6_scopeid_pton.c @@ -33,6 +33,7 @@ __inet6_scopeid_pton (const struct in6_addr *address, const char *scope, uint32_t *result) { if (IN6_IS_ADDR_LINKLOCAL (address) + || IN6_IS_ADDR_MC_NODELOCAL (address) || IN6_IS_ADDR_MC_LINKLOCAL (address)) { uint32_t number = __if_nametoindex (scope); diff --git a/inet/tst-inet6_scopeid_pton.c b/inet/tst-inet6_scopeid_pton.c index a1bafa9021c..8225b3b80ab 100644 --- a/inet/tst-inet6_scopeid_pton.c +++ b/inet/tst-inet6_scopeid_pton.c @@ -218,9 +218,9 @@ do_test (void) { expect_success ("fe80::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 ("::1", interface_name); - expect_failure ("ff01::1", interface_name); expect_failure ("2001:db8::1", interface_name); }