]> tinc-vpn.org Git - tinc/blobdiff - src/netutl.c
Chdir() to the configuration directory instead of /.
[tinc] / src / netutl.c
index 701a430935db52c145cdb12f5401fbe711d2dcf5..2eebb6445ec5266ccaf36847a44d9dfab027f991 100644 (file)
@@ -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;
        }