summaryrefslogtreecommitdiff
path: root/main/dnsmgr.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-06-08 18:48:16 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-06-08 18:48:16 +0000
commit4b773e2ed9bd72942e84d9dd4d00c9ab595d403d (patch)
treef111f3b471882e6454ac74845ffe5438d247b844 /main/dnsmgr.c
parent9598e5bc2fd04f59698165bd89fb9cdc2d76cd15 (diff)
Merged revisions 322425 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r322425 | rmudgett | 2011-06-08 13:46:30 -0500 (Wed, 08 Jun 2011) | 16 lines 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/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/dnsmgr.c')
-rw-r--r--main/dnsmgr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/dnsmgr.c b/main/dnsmgr.c
index 23e1ab6ef..9002ec87f 100644
--- a/main/dnsmgr.c
+++ b/main/dnsmgr.c
@@ -131,6 +131,14 @@ int ast_dnsmgr_lookup(const char *name, struct ast_sockaddr *result, struct ast_
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;
+ }
+
ast_verb(4, "doing dnsmgr_lookup for '%s'\n", name);
/* do a lookup now but add a manager so it will automagically get updated in the background */