From abf40d9b28c0fc8339643e2903692e154d32719e Mon Sep 17 00:00:00 2001 From: "Michael L. Young" Date: Mon, 16 Apr 2012 21:20:50 +0000 Subject: Add IPv6 address support to security events framework. The current Security Events Framework API only supports IPv4 when it comes to generating security events. This patch does the following: * Changes the Security Events Framework API to support IPV6 and updates the components that use this API. * Eliminates an error message that was being generated since the current implementation was treating an IPv6 socket address as if it was IPv4. * Some copyright dates were updated on files touched by this patch. (closes issue ASTERISK-19447) Reported by: Michael L. Young Tested by: Michael L. Young Patches: security_events_ipv6v3.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/1777/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362200 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/security_events_defs.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include/asterisk') diff --git a/include/asterisk/security_events_defs.h b/include/asterisk/security_events_defs.h index 61134e29c..c73eb2987 100644 --- a/include/asterisk/security_events_defs.h +++ b/include/asterisk/security_events_defs.h @@ -1,7 +1,7 @@ /* * Asterisk -- An open source telephony toolkit. * - * Copyright (C) 2009, Digium, Inc. + * Copyright (C) 2012, Digium, Inc. * * Russell Bryant * @@ -151,8 +151,8 @@ enum ast_security_event_transport_type { #define AST_SEC_EVT(e) ((struct ast_security_event_common *) e) -struct ast_security_event_ipv4_addr { - const struct sockaddr_in *sin; +struct ast_security_event_ip_addr { + const struct ast_sockaddr *addr; enum ast_security_event_transport_type transport; }; @@ -202,12 +202,12 @@ struct ast_security_event_common { * \brief Local address the request came in on * \note Always required */ - struct ast_security_event_ipv4_addr local_addr; + struct ast_security_event_ip_addr local_addr; /*! * \brief Remote address the request came from * \note Always required */ - struct ast_security_event_ipv4_addr remote_addr; + struct ast_security_event_ip_addr remote_addr; }; /*! @@ -418,7 +418,7 @@ struct ast_security_event_unexpected_addr { * \brief Event descriptor version * \note This _must_ be changed if this event descriptor is changed. */ - #define AST_SECURITY_EVENT_UNEXPECTED_ADDR_VERSION 1 + #define AST_SECURITY_EVENT_UNEXPECTED_ADDR_VERSION 2 /*! * \brief Common security event descriptor elements * \note Account ID required @@ -428,7 +428,7 @@ struct ast_security_event_unexpected_addr { * \brief Expected remote address * \note required */ - struct ast_security_event_ipv4_addr expected_addr; + struct ast_security_event_ip_addr expected_addr; }; /*! -- cgit v1.2.3