mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-18 01:42:21 +03:00
Some systems define IP_FREEBIND but don't implement it which result in setsockopt() failing. No need to die in that case, just ignore the error.
This commit is contained in:
parent
4413284420
commit
078827ad3f
8
common.c
8
common.c
@ -133,8 +133,12 @@ int start_listen_sockets(int *sockfd[], struct addrinfo *addr_list)
|
|||||||
|
|
||||||
if (IP_FREEBIND) {
|
if (IP_FREEBIND) {
|
||||||
res = setsockopt((*sockfd)[i], IPPROTO_IP, IP_FREEBIND, (char*)&one, sizeof(one));
|
res = setsockopt((*sockfd)[i], IPPROTO_IP, IP_FREEBIND, (char*)&one, sizeof(one));
|
||||||
check_res_dumpdie(res, addr, "setsockopt(IP_FREEBIND)");
|
if (res == -1) {
|
||||||
}
|
fprintf(stderr, "%s:%s: %s\n",
|
||||||
|
sprintaddr(buf, sizeof(buf), addr),
|
||||||
|
syscall,
|
||||||
|
strerror(errno));
|
||||||
|
}
|
||||||
|
|
||||||
res = bind((*sockfd)[i], addr->ai_addr, addr->ai_addrlen);
|
res = bind((*sockfd)[i], addr->ai_addr, addr->ai_addrlen);
|
||||||
check_res_dumpdie(res, addr, "bind");
|
check_res_dumpdie(res, addr, "bind");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user