[ofa-general] [RDMA CM IPv6 support. PATCHv3 6/9] IPv6 support in cma_bind_any

Aleksey Senin alekseys at voltaire.com
Wed Aug 13 01:14:06 PDT 2008


>From a68edf613672c6d9effedb6d73dfca13e071d7b8 Mon Sep 17 00:00:00 2001
From: Aleksey Senin <alekseys at voltaire.com>
Date: Wed, 13 Aug 2008 10:03:16 +0300
Subject: [RDMA CM IPv6 support. PATCHv3 6/9] IPv6 support in cma_bind_any

Using sockaddr_storage structure instead of sockaddr_in for
catching IPv6 protocol

Signed-off-by: Aleksey Senin <alekseys at voltaire.com>
---
 drivers/infiniband/core/cma.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 31f2aa2..df22c5c 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1467,10 +1467,10 @@ static void cma_listen_on_all(struct rdma_id_private *id_priv)
 
 static int cma_bind_any(struct rdma_cm_id *id, sa_family_t af)
 {
-	struct sockaddr_in addr_in;
+	struct sockaddr_storage addr_in;
 
 	memset(&addr_in, 0, sizeof addr_in);
-	addr_in.sin_family = af;
+	addr_in.ss_family = af;
 	return rdma_bind_addr(id, (struct sockaddr *) &addr_in);
 }
 
-- 
1.5.6.dirty





More information about the general mailing list