Merged revisions 285455 via svnmerge from
authorJason Parker <jparker@digium.com>
Tue, 7 Sep 2010 22:23:32 +0000 (22:23 +0000)
committerJason Parker <jparker@digium.com>
Tue, 7 Sep 2010 22:23:32 +0000 (22:23 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r285455 | qwell | 2010-09-07 17:22:14 -0500 (Tue, 07 Sep 2010) | 8 lines

  Don't automatically add domains for wildcard bindaddrs.

  (closes issue #17832)
  Reported by: oej
  Patches:
        17832-wildcard.diff uploaded by qwell (license 4)
  Tested by: qwell
........

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

channels/chan_sip.c

index 658462a..5baf844 100644 (file)
@@ -27230,10 +27230,10 @@ static int reload_config(enum channelreloadreason reason)
                char temp[MAXHOSTNAMELEN];
 
                /* First our default IP address */
-               if (!ast_sockaddr_isnull(&bindaddr)) {
+               if (!ast_sockaddr_isnull(&bindaddr) && !ast_sockaddr_is_any(&bindaddr)) {
                        add_sip_domain(ast_sockaddr_stringify_addr(&bindaddr),
                                       SIP_DOMAIN_AUTO, NULL);
-               } else if (!ast_sockaddr_isnull(&internip)) {
+               } else if (!ast_sockaddr_isnull(&internip) && !ast_sockaddr_is_any(&internip)) {
                /* Our internal IP address, if configured */
                        add_sip_domain(ast_sockaddr_stringify_addr(&internip),
                                       SIP_DOMAIN_AUTO, NULL);