|
Lines 1193-1198
server_listen(void)
Link Here
|
| 1193 |
&on, sizeof(on)) == -1) |
1193 |
&on, sizeof(on)) == -1) |
| 1194 |
error("setsockopt SO_REUSEADDR: %s", strerror(errno)); |
1194 |
error("setsockopt SO_REUSEADDR: %s", strerror(errno)); |
| 1195 |
|
1195 |
|
|
|
1196 |
#ifdef IP_FREEBIND |
| 1197 |
/* |
| 1198 |
* Allow to bind nonlocal address or the address that does not |
| 1199 |
* yet exists. (since Linux 2.4) |
| 1200 |
*/ |
| 1201 |
if (setsockopt(listen_sock, IPPROTO_IP, IP_FREEBIND, |
| 1202 |
&on, sizeof(on)) == -1) |
| 1203 |
error("setsockopt IP_FREEBIND: %s", strerror(errno)); |
| 1204 |
#endif |
| 1205 |
|
| 1196 |
/* Only communicate in IPv6 over AF_INET6 sockets. */ |
1206 |
/* Only communicate in IPv6 over AF_INET6 sockets. */ |
| 1197 |
if (ai->ai_family == AF_INET6) |
1207 |
if (ai->ai_family == AF_INET6) |
| 1198 |
sock_set_v6only(listen_sock); |
1208 |
sock_set_v6only(listen_sock); |