From: Mark Michelson Date: Fri, 27 Apr 2012 21:58:06 +0000 (+0000) Subject: Don't attempt to make use of the dynamic_exclude_static ACL if DNS lookup fails. X-Git-Tag: 10.5.0-rc1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=896ab7bef8fe2ce852f41b5e79cc88b9f8e7ea96;p=thirdparty%2Fasterisk.git Don't attempt to make use of the dynamic_exclude_static ACL if DNS lookup fails. (closes issue ASTERISK-18321) Reported by Dan Lukes Patches: ASTERISK-18321.patch by Mark Michelson (license #5049) ........ Merged revisions 364341 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@364342 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 1d218e1855..25056ded43 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -28694,7 +28694,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str ast_string_field_set(peer, tohost, srvlookup); - if (global_dynamic_exclude_static) { + if (global_dynamic_exclude_static && !ast_sockaddr_isnull(&peer->addr)) { int ha_error = 0; sip_cfg.contact_ha = ast_append_ha("deny", ast_sockaddr_stringify_addr(&peer->addr), sip_cfg.contact_ha, &ha_error);