commit 3cb7e8d7ace5f0ba13193181d5f8d63aa1923e0b from: Omar Polo date: Fri Aug 25 09:40:09 2023 UTC ignore some errors from socket(2) There's no much we can do if we resolv an IPv6 address but its support is disabled in the current kernel, so ignore and go ahead. Spotted while testing gmid i n a FreeBSD jail without IPv6. commit - 39204b7e4889461b20e0d51ac4e6030377077f85 commit + 3cb7e8d7ace5f0ba13193181d5f8d63aa1923e0b blob - 92881efa026540d311aac1200a9bfae97cd3017b blob + 375d58daf6e0af1ddc100c287deec5a657a6fe9f --- config.c +++ config.c @@ -18,6 +18,7 @@ #include +#include #include #include #include @@ -244,8 +245,11 @@ config_send_socks(struct conf *conf) TAILQ_FOREACH(addr, &conf->addrs, addrs) { sock = socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol); - if (sock == -1) + if (sock == -1) { + if (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT) + continue; fatal("socket"); + } v = 1; if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &v, sizeof(v))