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.
This commit is contained in:
@@ -745,7 +745,7 @@ static int sctp_create_new_listener(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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);
|
SCTP_ERROR("socket: %s:%d\n", strerror(errno), errno);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user