[ofa-general] [RMDA CM IPv6 support. PATCHv4 3/6] IPv6 support in cma_bind_any

Aleksey Senin alekseys at voltaire.com
Wed Nov 26 09:56:09 PST 2008


>From 16579a6bd3da5d2f7fd46bc71261bf87f0baa6ae Mon Sep 17 00:00:00 2001
From: Aleksey Senin <alekseys at voltaire.com>
Date: Wed, 13 Aug 2008 10:03:16 +0300
Subject: [PATCH] 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