[stgt] [PATCH] fix isns connection failure

Chandra Seetharaman sekharan at us.ibm.com
Thu Jul 29 03:31:58 CEST 2010


Hi Tomo,

I have a configuration where the isns server is running at 10.0.0.1 and
tgtd is running at 10.0.0.51.

When I define a new target I saw the following message
in /var/log/messages.
------------------
Jul 28 14:14:30 if01n2 tgtd: isns_get_ip(112) getaddrinfo error
Temporary failure in name resolution!
------------------

Debugging that I found the attached patch fixes the problem. But, I am
not a networking person, so I am not sure if this is the right fix. :)
If it is, please apply.

regards,

chandra
------------------------
Fix the error
"isns_get_ip(112) getaddrinfo error Temporary failure in name resolution!"

by providing NI_NUMERICHOST in flags of getnameinfo().

Also fix a typo (getaddrinfo to getnameinfo in eprintf).

Signed-Off-By: Chandra Seetharaman <sekharan at us.ibm.com>
---
 usr/iscsi/isns.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: tgt-469b574/usr/iscsi/isns.c
===================================================================
--- tgt-469b574.orig/usr/iscsi/isns.c
+++ tgt-469b574/usr/iscsi/isns.c
@@ -107,9 +107,9 @@ static int isns_get_ip(int fd)
 	}
 
 	err = getnameinfo((struct sockaddr *) &lss, sizeof(lss),
-			  eid, sizeof(eid), NULL, 0, 0);
+			  eid, sizeof(eid), NULL, 0, NI_NUMERICHOST);
 	if (err) {
-		eprintf("getaddrinfo error %s!\n", gai_strerror(err));
+		eprintf("getnameinfo error %s!\n", gai_strerror(err));
 		return err;
 	}
 


--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list