Listen to a control socket on an IPv4 as well through
an IPv4-mapped IPv6 address. Reported by: Julian H. Stacey <jhs__at__flat.berklix.net> Test by: Julian H. Stacey <jhs__at__flat.berklix.net> MFC after: 1 week
This commit is contained in:
parent
5ef35a9854
commit
bba6dc1d5b
@ -346,6 +346,13 @@ server_TcpOpen(struct bundle *bundle, u_short port)
|
|||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NOINET6
|
||||||
|
if (probe.ipv6_available) {
|
||||||
|
int off = 0;
|
||||||
|
setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&off, sizeof(off));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &s, sizeof s);
|
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &s, sizeof s);
|
||||||
if (bind(s, (struct sockaddr *)&ss, sz) < 0) {
|
if (bind(s, (struct sockaddr *)&ss, sz) < 0) {
|
||||||
log_Printf(LogWARN, "Tcp: bind: %s\n", strerror(errno));
|
log_Printf(LogWARN, "Tcp: bind: %s\n", strerror(errno));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user