@@ -653,6 +653,7 @@
# define NI_IDN_USE_STD3_ASCII_RULES 128 /* Validate strings according to
STD3 rules. */
# endif
+# define NI_NUMERICSCOPE 256 /* Don't convert scope_id to name. */
/* Translate name of a service location and/or a service name to set of
socket addresses.
@@ -331,7 +331,8 @@
if (IN6_IS_ADDR_LINKLOCAL (&sin6p->sin6_addr)
|| IN6_IS_ADDR_MC_LINKLOCAL (&sin6p->sin6_addr))
{
- if (if_indextoname (scopeid, scopeptr) == NULL)
+ if ((flags & NI_NUMERICSCOPE) ||
+ if_indextoname (scopeid, scopeptr) == NULL)
++ni_numericscope;
else
scopelen = strlen (scopebuf);