summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2012-04-27 22:11:01 +0000
committerMark Michelson <mmichelson@digium.com>2012-04-27 22:11:01 +0000
commit1a58b3b7755735681a61ea002ab296f057dd70a4 (patch)
treef37bc5c7eca36c98da658390ffed575ac64f6787
parent50c959580c61a5049e2c6d62436b9414b254bd9f (diff)
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 ........ Merged revisions 364342 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 75af69d0d..fee78e99e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -28926,7 +28926,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);