All of lore.kernel.org
 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
  0 siblings, 0 replies; 22+ 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] 22+ messages in thread

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

Thread overview: 22+ 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 ` Vlad Yasevich
2008-05-09 19:09 ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk Vlad Yasevich
2008-05-09 19:09   ` Vlad Yasevich
2008-05-09 22:12   ` [PATCH] [SCTP]: Add address type check while process David Miller
2008-05-09 22:12     ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk David Miller
2008-05-13 11:30   ` [PATCH] [SCTP]: Add address type check while process paramaters Patrick McHardy
2008-05-13 11:30     ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk Patrick McHardy
2008-05-13 12:48     ` [PATCH] [SCTP]: Add address type check while process paramaters Vlad Yasevich
2008-05-13 12:48       ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk Vlad Yasevich
2008-05-13 22:32       ` [PATCH] [SCTP]: Add address type check while process David Miller
2008-05-13 22:32         ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk David Miller
2008-05-14  0:56         ` [PATCH] [SCTP]: Add address type check while process paramaters Wei Yongjun
2008-05-14  0:56           ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk Wei Yongjun
2008-05-14  1:14           ` [PATCH] [SCTP]: Add address type check while process David Miller
2008-05-14  1:14             ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk David Miller
2008-05-14  1:49             ` [PATCH] [SCTP]: Add address type check while process paramaters Wei Yongjun
2008-05-14  1:49               ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk Wei Yongjun
2008-05-14  6:25       ` [PATCH] [SCTP]: Add address type check while process David Miller
2008-05-14  6:25         ` [PATCH] [SCTP]: Add address type check while process paramaters of ASCONF chunk David Miller
2008-05-09 22:11 ` [PATCH] [SCTP]: Do not enable peer IPv6 address support on David Miller
2008-05-09 22:11   ` [PATCH] [SCTP]: Do not enable peer IPv6 address support on PF_INET socket David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.