projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
475088e
)
Put brackets around IPv6 addresses in invitation URL, even if there is no port number.
author
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 25 Apr 2014 15:00:55 +0000
(17:00 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 25 Apr 2014 15:00:55 +0000
(17:00 +0200)
src/invitation.c
patch
|
blob
|
history
diff --git
a/src/invitation.c
b/src/invitation.c
index cdef3d0480efa04278ecb834156ef9332de99ec0..63a443d449d562b3d69b5f046c4c2f2f108e051e 100644
(file)
--- a/
src/invitation.c
+++ b/
src/invitation.c
@@
-197,8
+197,10
@@
done:
else
xasprintf(&hostport, "%s:%s", hostname, port);
} else {
- hostport = hostname;
- hostname = NULL;
+ if(strchr(hostname, ':'))
+ xasprintf(&hostport, "[%s]", hostname);
+ else
+ hostport = xstrdup(hostname);
}
free(hostname);