Skip to content
Snippets Groups Projects
Commit 6d6ce303 authored by Olle Johansson's avatar Olle Johansson
Browse files

Add known internal IP address when autodomain=yes

(closes issue #14573)
Reported by: pj
Patches: 
      sip-internip-autodomain1.diff uploaded by mnicholson (license 96)
	modified by oej
Tested by: pj



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent b3e97dc9
No related branches found
No related tags found
No related merge requests found
...@@ -25491,10 +25491,14 @@ static int reload_config(enum channelreloadreason reason) ...@@ -25491,10 +25491,14 @@ static int reload_config(enum channelreloadreason reason)
char temp[MAXHOSTNAMELEN]; char temp[MAXHOSTNAMELEN];
   
/* First our default IP address */ /* First our default IP address */
if (bindaddr.sin_addr.s_addr) if (bindaddr.sin_addr.s_addr) {
add_sip_domain(ast_inet_ntoa(bindaddr.sin_addr), SIP_DOMAIN_AUTO, NULL); add_sip_domain(ast_inet_ntoa(bindaddr.sin_addr), SIP_DOMAIN_AUTO, NULL);
else } else if (internip.sin_addr.s_addr) {
/* Our internal IP address, if configured */
add_sip_domain(ast_inet_ntoa(internip.sin_addr), SIP_DOMAIN_AUTO, NULL);
} else {
ast_log(LOG_NOTICE, "Can't add wildcard IP address to domain list, please add IP address to domain manually.\n"); ast_log(LOG_NOTICE, "Can't add wildcard IP address to domain list, please add IP address to domain manually.\n");
}
   
/* If TCP is running on a different IP than UDP, then add it too */ /* If TCP is running on a different IP than UDP, then add it too */
if (sip_tcp_desc.local_address.sin_addr.s_addr && !inaddrcmp(&bindaddr, &sip_tcp_desc.local_address)) if (sip_tcp_desc.local_address.sin_addr.s_addr && !inaddrcmp(&bindaddr, &sip_tcp_desc.local_address))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment