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
10-digiumphones
Richard Mudgett 14 years ago
parent 9598e5bc2f
commit 4b773e2ed9

@ -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 */

Loading…
Cancel
Save