Commit f7715a8d authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

mac: Add brackets around IPv6 endpoints

parent b12e2df8
......@@ -201,7 +201,10 @@ mac_tcp(void *priv, const struct suckaddr *sa)
ls->addr = VTCP_my_suckaddr(ls->sock);
VTCP_myname(ls->sock, abuf, sizeof abuf,
pbuf, sizeof pbuf);
bprintf(nbuf, "%s:%s", abuf, pbuf);
if (VSA_Get_Proto(sa) == AF_INET6)
bprintf(nbuf, "[%s]:%s", abuf, pbuf);
else
bprintf(nbuf, "%s:%s", abuf, pbuf);
REPLACE(ls->endpoint, nbuf);
}
VTAILQ_INSERT_TAIL(&la->socks, ls, arglist);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment