Skip to content

Commit

Permalink
dispatcher: Ignore IPv6 addresses if IPv6 lookups are disabled.
Browse files Browse the repository at this point in the history
(cherry picked from commit 2d7f748)
  • Loading branch information
gaaf committed Nov 10, 2014
1 parent 2d311c5 commit 51b7e8f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/dispatcher/dispatch.c
Expand Up @@ -262,6 +262,13 @@ int add_dest2list(int id, str uri, int flags, int priority, str *attrs,
goto err;
}

/* skip IPv6 references if IPv6 lookups are disabled */
if (default_core_cfg.dns_try_ipv6 == 0 &&
puri.host.s[0] == '[' && puri.host.s[puri.host.len-1] == ']') {
LM_DBG("skipping IPv6 record %.*s\n", puri.host.len, puri.host.s);
return 0;
}

/* get dest set */
sp = ds_lists[list_idx];
while(sp)
Expand Down

0 comments on commit 51b7e8f

Please sign in to comment.