[asterisk-commits] rmudgett: branch 1.8 r322425 - /branches/1.8/main/dnsmgr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 8 13:46:35 CDT 2011


Author: rmudgett
Date: Wed Jun  8 13:46:30 2011
New Revision: 322425

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=322425
Log:
SRV lookup attempted for SIP peers listed as an IP address.

Asterisk attempts to SRV lookup a host name even if the host name is an IP
address.  Regression introduced when IPv6 support was added.

* Restored the check in ast_dnsmgr_lookup() to see if the given host name
is an IP address.  The IP address could be in either IPv4 or IPv6 formats.

(closes issue ASTERISK-17815)
Reported by: Byron Clark
Tested by: Byron Clark, Richard Mudgett
Patches:
     issue19248_v1.8.patch - uploaded by Richard Mudgett (License #5621)

Review: https://reviewboard.asterisk.org/r/1240/

Modified:
    branches/1.8/main/dnsmgr.c

Modified: branches/1.8/main/dnsmgr.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/dnsmgr.c?view=diff&rev=322425&r1=322424&r2=322425
==============================================================================
--- branches/1.8/main/dnsmgr.c (original)
+++ branches/1.8/main/dnsmgr.c Wed Jun  8 13:46:30 2011
@@ -128,6 +128,14 @@
 	}
 
 	if (*dnsmgr && !strcasecmp((*dnsmgr)->name, name)) {
+		return 0;
+	}
+
+	/*
+	 * If it's actually an IP address and not a name, there's no
+	 * need for a managed lookup.
+	 */
+	if (ast_sockaddr_parse(result, name, 0)) {
 		return 0;
 	}
 




More information about the asterisk-commits mailing list