Version: 1
-Previous: a6912b34623c31df09a3ba6a9048b3f679a36e7c
-Head: b64f5de64499922645e9d4f7de5e052d9ba9358f
+Previous: 0d8e855c451546caa9fd8deecfe04a2bfc9d397d
+Head: 45d7cbcc273f70e51719f0673267f0cb0f5cfcb3
Applied:
af_ib: 35b4fe1c3e856dee01d437af0950a3ff2e59dade
sa_family: b64f5de64499922645e9d4f7de5e052d9ba9358f
+ refresh-temp: 45d7cbcc273f70e51719f0673267f0cb0f5cfcb3
Unapplied:
dbg-fork: 5679a32af8305db3c0406f9abb961259304a384a
dbg-out: 4b4c0572eab77856d8fbb919b1feb8f3502a101a
--- /dev/null
+Bottom: 1f3e91359a2a6d34a157b3b986b2afac307079ae
+Top: b818a49f265b98fc20de6ebcd8b46a3d2e72a1d8
+Author: Sean Hefty <sean.hefty@intel.com>
+Date: 2012-08-23 15:56:47 -0700
+
+Refresh of sa_family
+
+---
+
+diff --git a/src/acm.c b/src/acm.c
+index 458e23d..d96dbcd 100755
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -258,6 +258,8 @@ static void ucma_ib_save_resp(struct rdma_addrinfo *rai, cma_acm_msg_t *msg)
+ struct acm_ep_addr_data *ep_data;
+ struct ibv_path_data *path_data = NULL;
+ struct ibv_path_record *pri_path = NULL;
++ struct sockaddr_in *sin;
++ struct sockaddr_in6 *sin6;
+ int i, cnt, path_cnt = 0;
+
+ cnt = (msg->hdr.length - ACM_MSG_HDR_LENGTH) / ACM_MSG_EP_LENGTH;
+@@ -277,25 +279,27 @@ static void ucma_ib_save_resp(struct rdma_addrinfo *rai, cma_acm_msg_t *msg)
+ if (!(ep_data->flags & ACM_EP_FLAG_SOURCE) || rai->ai_src_len)
+ break;
+
+- rai->ai_src_addr = calloc(1, sizeof(struct sockaddr_in));
+- if (!rai->ai_src_addr)
++ sin = calloc(1, sizeof(*sin));
++ if (!sin)
+ break;
+
+- rai->ai_src_len = sizeof(struct sockaddr_in);
+- memcpy(&((struct sockaddr_in *) rai->ai_src_addr)->sin_addr,
+- &ep_data->info.addr, 4);
++ sin->sin_family = AF_INET;
++ memcpy(&sin->sin_addr, &ep_data->info.addr, 4);
++ rai->ai_src_len = sizeof(*sin);
++ rai->ai_src_addr = (struct sockaddr *) sin;
+ break;
+ case ACM_EP_INFO_ADDRESS_IP6:
+ if (!(ep_data->flags & ACM_EP_FLAG_SOURCE) || rai->ai_src_len)
+ break;
+
+- rai->ai_src_addr = calloc(1, sizeof(struct sockaddr_in6));
+- if (!rai->ai_src_addr)
++ sin6 = calloc(1, sizeof(*sin6));
++ if (!sin6)
+ break;
+
+- rai->ai_src_len = sizeof(struct sockaddr_in6);
+- memcpy(&((struct sockaddr_in6 *) rai->ai_src_addr)->sin6_addr,
+- &ep_data->info.addr, 16);
++ sin6->sin6_family = AF_INET6;
++ memcpy(&sin6->sin6_addr, &ep_data->info.addr, 16);
++ rai->ai_src_len = sizeof(*sin6);
++ rai->ai_src_addr = (struct sockaddr *) sin6;
+ break;
+ default:
+ break;