X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_setup.c;h=e3c543c9d8511ea1c1ece523d52c538be0e8c17f;hb=2f9a1d4ab5ff51b05a5e8cc41a1528fdeb36c723;hp=eec1711af9e863b85456f56090f1f2b082388bfc;hpb=132bdb77a0792d85d03ad89f846cbd4024037393;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index eec1711a..e3c543c9 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -417,7 +417,7 @@ char *get_name(void) { return false; } if(gethostname(hostname, sizeof hostname) || !*hostname) { - logger(DEBUG_ALWAYS, LOG_ERR, "Could not get hostname: %s\n", strerror(errno)); + logger(DEBUG_ALWAYS, LOG_ERR, "Could not get hostname: %s\n", sockstrerror(sockerrno)); return false; } hostname[31] = 0; @@ -980,7 +980,7 @@ static bool setup_myself(void) { for(int i = 0; i < listen_sockets; i++) { salen = sizeof sa; if(getsockname(i + 3, &sa.sa, &salen) < 0) { - logger(DEBUG_ALWAYS, LOG_ERR, "Could not get address of listen fd %d: %s", i + 3, sockstrerror(errno)); + logger(DEBUG_ALWAYS, LOG_ERR, "Could not get address of listen fd %d: %s", i + 3, sockstrerror(sockerrno)); return false; }