Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2c39584 authored by Wei Yongjun's avatar Wei Yongjun Committed by Vlad Yasevich
Browse files

sctp: fix to only enable IPv6 address support on PF_INET6 socket



If socket is create by PF_INET type, it can not used IPv6 address
to send/recv DATA. So only enable IPv6 address support on PF_INET6
socket.

Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
parent 4553e88d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
	 * told otherwise.
	 */
	asoc->peer.ipv4_address = 1;
	if (asoc->base.sk->sk_family == PF_INET6)
		asoc->peer.ipv6_address = 1;
	INIT_LIST_HEAD(&asoc->asocs);