Commit 29f23e16 authored by Robert Schmidt's avatar Robert Schmidt

Fix socket type to IPv4 in case of no-multi usage

sctp_create_new_listener() takes a parameter server_type which is NOT
the IP version but whether it is an SCTP multihoming server. There was a
bug that when multihoming is not wanted, it created an IPv6 socket
instead of IPv4. This commit fixes this.

IPv6 is not supported yet.
parent e389b798
......@@ -745,7 +745,7 @@ static int sctp_create_new_listener(
}
}
else {
if ((sd = socket(AF_INET6, SOCK_STREAM, IPPROTO_SCTP)) < 0) {
if ((sd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP)) < 0) {
SCTP_ERROR("socket: %s:%d\n", strerror(errno), errno);
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment