aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-16 09:28:17 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-16 09:28:17 +0000
commita0ebb468aee3b254f7e9982b73c358c87c892d56 (patch)
tree172a7847ce554bfef987c54020d77a58f205ae1d /channels
parentd3b6e590b0749fa0468f56fb1f1f777a7f254130 (diff)
Ensure the ipaddr field in realtime is large enough to handle IPv6 addresses.
(closes issue #18464) Reported by: IgorG Patches: realtime_ipv6store.diff uploaded by IgorG (license 20) (plus a few additional lines by tilghman) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@298539 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ede666b78..c9b059258 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4195,7 +4195,7 @@ static int sip_sendtext(struct ast_channel *ast, const char *text)
static void realtime_update_peer(const char *peername, struct ast_sockaddr *addr, const char *defaultuser, const char *fullcontact, const char *useragent, int expirey, unsigned short deprecated_username, int lastms)
{
char port[10];
- char ipaddr[INET_ADDRSTRLEN];
+ char ipaddr[INET6_ADDRSTRLEN];
char regseconds[20];
char *tablename = NULL;
char str_lastms[20];
@@ -4402,7 +4402,7 @@ static struct sip_peer *realtime_peer(const char *newpeername, struct ast_sockad
struct ast_variable *varregs = NULL;
struct ast_variable *tmp;
struct ast_config *peerlist = NULL;
- char ipaddr[INET_ADDRSTRLEN];
+ char ipaddr[INET6_ADDRSTRLEN];
char portstring[6]; /*up to 5 digits plus null terminator*/
char *cat = NULL;
int realtimeregs = ast_check_realtime("sipregs");
@@ -28632,7 +28632,7 @@ static int load_module(void)
ast_realtime_require_field(ast_check_realtime("sipregs") ? "sipregs" : "sippeers",
"name", RQ_CHAR, 10,
- "ipaddr", RQ_CHAR, 15,
+ "ipaddr", RQ_CHAR, INET6_ADDRSTRLEN - 1,
"port", RQ_UINTEGER2, 5,
"regseconds", RQ_INTEGER4, 11,
"defaultuser", RQ_CHAR, 10,