git ssb

0+

cel / sslh



Commit 078827ad3fedb640e45e079a5d34e2771e04a36f

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.

Yves Rutschle committed on 4/6/2017, 2:26:27 PM
Parent: 4413284420e2b1eb93d7f2630e237fd2f497f584

Files changed

common.cchanged
common.cView
@@ -132,10 +132,14 @@
132132 }
133133
134134 if (IP_FREEBIND) {
135135 res = setsockopt((*sockfd)[i], IPPROTO_IP, IP_FREEBIND, (char*)&one, sizeof(one));
136- check_res_dumpdie(res, addr, "setsockopt(IP_FREEBIND)");
137- }
136+ if (res == -1) {
137+ fprintf(stderr, "%s:%s: %s\n",
138+ sprintaddr(buf, sizeof(buf), addr),
139+ syscall,
140+ strerror(errno));
141+ }
138142
139143 res = bind((*sockfd)[i], addr->ai_addr, addr->ai_addrlen);
140144 check_res_dumpdie(res, addr, "bind");
141145

Built with git-ssb-web