[openib-general] [PATCH] [CMA] pad address information to handle IPv6 addresses

Sean Hefty sean.hefty at intel.com
Mon Nov 14 11:48:08 PST 2005


This patch provides padding beyond the source and destination addresses
to handle IPv6 address sizes.

Does anyone know of a better way to handle this?

Signed-off-by: Sean Hefty <sean.hefty at intel.com>


Index: include/rdma/rdma_cm.h
===================================================================
--- include/rdma/rdma_cm.h	(revision 4022)
+++ include/rdma/rdma_cm.h	(working copy)
@@ -31,6 +31,7 @@
 #define RDMA_CM_H
 
 #include <linux/socket.h>
+#include <linux/in6.h>
 #include <rdma/ib_addr.h>
 #include <rdma/ib_sa.h>
 
@@ -55,7 +56,11 @@
 
 struct rdma_addr {
 	struct sockaddr src_addr;
+	u8		src_pad[sizeof(struct sockaddr_in6) -
+				sizeof(struct sockaddr)];
 	struct sockaddr dst_addr;
+	u8		dst_pad[sizeof(struct sockaddr_in6) -
+				sizeof(struct sockaddr)];
 	union {
 		struct ib_addr	ibaddr;
 	} addr;






More information about the general mailing list