diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2009-04-07 04:35:11 -0400 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-06-03 09:14:46 -0400 |
commit | a2c395846cf6abfdda3c04a19a0982adbb6469c2 (patch) | |
tree | 61bd4a2939f686fffc8e9d2c2a29d3ec2456f436 /net/sctp | |
parent | 4553e88d876e7eb29db3e8f632101398900d2194 (diff) |
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: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/associola.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index f4b23043b610..e7b69a7360e2 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -293,7 +293,8 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a | |||
293 | * told otherwise. | 293 | * told otherwise. |
294 | */ | 294 | */ |
295 | asoc->peer.ipv4_address = 1; | 295 | asoc->peer.ipv4_address = 1; |
296 | asoc->peer.ipv6_address = 1; | 296 | if (asoc->base.sk->sk_family == PF_INET6) |
297 | asoc->peer.ipv6_address = 1; | ||
297 | INIT_LIST_HEAD(&asoc->asocs); | 298 | INIT_LIST_HEAD(&asoc->asocs); |
298 | 299 | ||
299 | asoc->autoclose = sp->autoclose; | 300 | asoc->autoclose = sp->autoclose; |