mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
when printing link-local addresses do not include the zone info.
This commit is contained in:
@@ -49,6 +49,14 @@ char *human_addr2(const struct sockaddr *sa, socklen_t salen,
|
||||
if (getnameinfo(sa, salen, buf, buflen, NULL, 0, NI_NUMERICHOST) != 0)
|
||||
return NULL;
|
||||
|
||||
if (salen == sizeof(struct sockaddr_in6)) {
|
||||
char *p = strchr(buf, '%');
|
||||
/* remove any zone info */
|
||||
if (p != NULL) {
|
||||
*p = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (full == 0)
|
||||
goto finish;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user