]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't attempt to make use of the dynamic_exclude_static ACL if DNS lookup fails.
authorMark Michelson <mmichelson@digium.com>
Fri, 27 Apr 2012 21:48:19 +0000 (21:48 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 27 Apr 2012 21:48:19 +0000 (21:48 +0000)
(closes issue ASTERISK-18321)
Reported by Dan Lukes
Patches:
ASTERISK-18321.patch by Mark Michelson (license #5049)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364341 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index f1ddb520c888e3f059c681ebe4beb282d6dcd8d0..c758bcf9daab9acff8f343f549872f45b02e7334 100644 (file)
@@ -27802,7 +27802,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);