netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [SCTP]: Do not enable peer IPv6 address support on PF_INET socket
@ 2008-05-09 19:09 Vlad Yasevich
  2008-05-09 19:09 ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk Vlad Yasevich
  2008-05-09 22:11 ` [PATCH] [SCTP]: Do not enable peer IPv6 address support on PF_INET socket David Miller
  0 siblings, 2 replies; 11+ messages in thread
From: Vlad Yasevich @ 2008-05-09 19:09 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-sctp, lksctp-developers, Wei Yongjun, Vlad Yasevich

From: Wei Yongjun <yjwei@cn.fujitsu.com>

If socket is create by PF_INET type, it can not used IPv6 address to
send/recv DATA, So we can not used IPv6 address even if peer tell us it
support IPv6 address.
This patch fix to only enabled peer 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>
---
 net/sctp/sm_make_chunk.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 81b6064..69a464f 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -2418,7 +2418,8 @@ static int sctp_process_param(struct sctp_association *asoc,
 				break;
 
 			case SCTP_PARAM_IPV6_ADDRESS:
-				asoc->peer.ipv6_address = 1;
+				if (PF_INET6 == asoc->base.sk->sk_family)
+					asoc->peer.ipv6_address = 1;
 				break;
 
 			case SCTP_PARAM_HOST_NAME_ADDRESS:
-- 
1.5.3.5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-05-14  6:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-09 19:09 [PATCH] [SCTP]: Do not enable peer IPv6 address support on PF_INET socket Vlad Yasevich
2008-05-09 19:09 ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk Vlad Yasevich
2008-05-09 22:12   ` David Miller
2008-05-13 11:30   ` Patrick McHardy
2008-05-13 12:48     ` Vlad Yasevich
2008-05-13 22:32       ` David Miller
2008-05-14  0:56         ` Wei Yongjun
2008-05-14  1:14           ` David Miller
2008-05-14  1:49             ` Wei Yongjun
2008-05-14  6:25       ` David Miller
2008-05-09 22:11 ` [PATCH] [SCTP]: Do not enable peer IPv6 address support on PF_INET socket David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).