libbb: make xmalloc_sockaddr2dotted use NI_NUMERICSCOPE
Gives "mount -t cifs //fe80::6a05:caff:fe3e:dbf5%eth0/test test" a chance to work: mount must pass "ip=numeric_IPv6%numeric_iface_id" in the omunt option string. Currently, it does not. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -496,12 +496,15 @@ char* FAST_FUNC xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa)
|
||||
{
|
||||
return sockaddr2str(sa, NI_NAMEREQD | IGNORE_PORT);
|
||||
}
|
||||
#ifndef NI_NUMERICSCOPE
|
||||
# define NI_NUMERICSCOPE 0
|
||||
#endif
|
||||
char* FAST_FUNC xmalloc_sockaddr2dotted(const struct sockaddr *sa)
|
||||
{
|
||||
return sockaddr2str(sa, NI_NUMERICHOST);
|
||||
return sockaddr2str(sa, NI_NUMERICHOST | NI_NUMERICSCOPE);
|
||||
}
|
||||
|
||||
char* FAST_FUNC xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa)
|
||||
{
|
||||
return sockaddr2str(sa, NI_NUMERICHOST | IGNORE_PORT);
|
||||
return sockaddr2str(sa, NI_NUMERICHOST | NI_NUMERICSCOPE | IGNORE_PORT);
|
||||
}
|
||||
|
Reference in New Issue
Block a user