ibacm/acme.c: acm/acme.c: Better error handling in resolve_gid
PATCH 1/1 ibacm/acme.c: acm/acme.c: Better error handling in resolve_gid
A return of 0 is an error for inet_pton but if 0 is returned from resolve_gid, show_path is mistakenly called so if 0 is returned from inet_pton, return -1 instead (which is what is done elsewhere in acme).
---
src/acme.c +8 -2
@@ -513,13 +513,19 @@ static int resolve_gid(struct ibv_path_record *path) ret =inet_pton (AF_INET6 , src_addr, &path->sgid);if (ret <=0 ) {printf ("inet_pton error on source address (%s): 0x%x\n" , src_addr, ret); -return ret; +if (ret) +return ret; +else +return -1 ; } ret =inet_pton (AF_INET6 , dest_addr, &path->dgid);if (ret <=0 ) {printf ("inet_pton error on dest address (%s): 0x%x\n" , dest_addr, ret); -return ret; +if (ret) +return ret; +else +return -1 ; } path->reversible_numpath =IBV_PATH_RECORD_REVERSIBLE |1 ;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 4F7E06E1.1040609-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
Hefty, Sean
Appliedapplied
Thanks for the changes!
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html