summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael L. Young <elgueromexicano@gmail.com>2012-04-17 15:00:02 +0000
committerMichael L. Young <elgueromexicano@gmail.com>2012-04-17 15:00:02 +0000
commit8337ecd38ddf144c645d8d762da3a44e4c740456 (patch)
treeede3d94f790b21ab8b8c51bad88ef8e6082b0c65
parent2fed9cfa8f92eadda1fd8569cadb912701f1a311 (diff)
Turn off warning message when bind address is set to any.
When a bind address is set to an ANY address (udpbindport=::), a warning message is displayed stating that "Address remapping activated in sip.conf but we're using IPv6, which doesn't need it. Please remove 'localnet' and/or 'externaddr' settings." But if one is running dual stack, we shouldn't be told to turn those settings off. This patch checks if the bind address is an ANY address or not. The warning message will now only be displayed if the bind address is NOT an ANY address and IPv6 is being used. Also, updated the copyright year. (closes issue ASTERISK-19456) Reported by: Michael L. Young Tested by: Michael L. Young Patches: chan_sip_ipv6_message.diff uploaded by Michael L. Young (license 5026) ........ Merged revisions 362253 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 362264 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1fe5eb45f..080dc9df8 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
- * Copyright (C) 1999 - 2006, Digium, Inc.
+ * Copyright (C) 1999 - 2012, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
@@ -3442,7 +3442,7 @@ static void ast_sip_ouraddrfor(const struct ast_sockaddr *them, struct ast_socka
ast_sockaddr_copy(&theirs, them);
if (ast_sockaddr_is_ipv6(&theirs)) {
- if (localaddr && !ast_sockaddr_isnull(&externaddr)) {
+ if (localaddr && !ast_sockaddr_isnull(&externaddr) && !ast_sockaddr_is_any(&bindaddr)) {
ast_log(LOG_WARNING, "Address remapping activated in sip.conf "
"but we're using IPv6, which doesn't need it. Please "
"remove \"localnet\" and/or \"externaddr\" settings.\n");