|
Lines 2467-2473
channel_setup_fwd_listener(int type, con
Link Here
|
| 2467 |
const char *host_to_connect, u_short port_to_connect, int gateway_ports) |
2467 |
const char *host_to_connect, u_short port_to_connect, int gateway_ports) |
| 2468 |
{ |
2468 |
{ |
| 2469 |
Channel *c; |
2469 |
Channel *c; |
| 2470 |
int sock, r, success = 0, wildcard = 0, is_client; |
2470 |
int sock, r, success = 0, wildcard = 0, is_client, on = 1; |
| 2471 |
struct addrinfo hints, *ai, *aitop; |
2471 |
struct addrinfo hints, *ai, *aitop; |
| 2472 |
const char *host, *addr; |
2472 |
const char *host, *addr; |
| 2473 |
char ntop[NI_MAXHOST], strport[NI_MAXSERV]; |
2473 |
char ntop[NI_MAXHOST], strport[NI_MAXSERV]; |
|
Lines 2577-2582
channel_setup_fwd_listener(int type, con
Link Here
|
| 2577 |
} |
2577 |
} |
| 2578 |
|
2578 |
|
| 2579 |
channel_set_reuseaddr(sock); |
2579 |
channel_set_reuseaddr(sock); |
|
|
2580 |
|
| 2581 |
#ifdef IPV6_V6ONLY |
| 2582 |
/* Only communicate in IPv6 over AF_INET6 sockets. */ |
| 2583 |
if (ai->ai_family == AF_INET6) { |
| 2584 |
if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, |
| 2585 |
&on, sizeof(on)) == -1) |
| 2586 |
error("setsockopt IPV6_V6ONLY: %s", |
| 2587 |
strerror(errno)); |
| 2588 |
} |
| 2589 |
#endif |
| 2580 |
|
2590 |
|
| 2581 |
debug("Local forwarding listening on %s port %s.", |
2591 |
debug("Local forwarding listening on %s port %s.", |
| 2582 |
ntop, strport); |
2592 |
ntop, strport); |