Message ID | 1395985810-23822-17-git-send-email-sean.hefty@intel.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
> Subject: [PATCH 16/16] ibacm: remove processing of IP's from ibacm_addr.cfg > > From: Ira Weiny <ira.weiny@intel.com> > > Flag an error and do not process IP's which may appear in this file. It probably makes sense to make this configurable, with the default to no longer process IP addresses in the file. The option to enable could be read from the configuration file. This provides an easy way for a user to re-enable this feature, in the off chance that it is in use. - Sean -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/src/acm.c b/src/acm.c index 651ccdd..c8a90ad 100644 --- a/src/acm.c +++ b/src/acm.c @@ -3115,12 +3115,10 @@ static int acm_assign_ep_names(struct acm_ep *ep) continue; acm_log(2, "%s", s); - if (inet_pton(AF_INET, addr, &ip_addr) > 0) { - type = ACM_ADDRESS_IP; - addr_len = 4; - } else if (inet_pton(AF_INET6, addr, &ip_addr) > 0) { - type = ACM_ADDRESS_IP6; - addr_len = ACM_MAX_ADDRESS; + if (inet_pton(AF_INET, addr, &ip_addr) > 0 + || inet_pton(AF_INET6, addr, &ip_addr) > 0) { + acm_log(0, "ERROR - IP's are no longer supported in this config file : %s", s); + continue; } else { type = ACM_ADDRESS_NAME; addr_len = strlen(addr);