projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e89a63
)
Let sockaddr2hostname() handle AF_UNSPEC addresses.
author
Sven-Haegar Koch
<haegar@sdinet.de>
Sun, 17 May 2015 03:29:21 +0000
(
05:29
+0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 17 May 2015 16:43:34 +0000
(18:43 +0200)
src/netutl.c
patch
|
blob
|
history
diff --git
a/src/netutl.c
b/src/netutl.c
index
701a430
..
2eebb64
100644
(file)
--- a/
src/netutl.c
+++ b/
src/netutl.c
@@
-121,7
+121,10
@@
char *sockaddr2hostname(const sockaddr_t *sa) {
char port[NI_MAXSERV] = "unknown";
int err;
- if(sa->sa.sa_family == AF_UNKNOWN) {
+ if(sa->sa.sa_family == AF_UNSPEC) {
+ xasprintf(&str, "unspec port unspec");
+ return str;
+ } else if(sa->sa.sa_family == AF_UNKNOWN) {
xasprintf(&str, "%s port %s", sa->unknown.address, sa->unknown.port);
return str;
}