aboutsummaryrefslogtreecommitdiffstats
path: root/acl.c
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-03 16:57:35 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-03 16:57:35 +0000
commitd27c458125a3412ca561ec38f6415588c9a9cdaa (patch)
treeba1b5449db44a3b9e545a2ad13d9ac2bbe5c3822 /acl.c
parent18edad800c797bc030a8d53e86b925d85f5e49b4 (diff)
Merge code associated with AST-2009-006
(closes issue #12912) Reported by: rathaus Tested by: tilghman, russell, dvossel, dbrooks git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@215958 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'acl.c')
-rw-r--r--acl.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/acl.c b/acl.c
index 9665f35e8..87250a993 100644
--- a/acl.c
+++ b/acl.c
@@ -74,14 +74,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
AST_MUTEX_DEFINE_STATIC(routeseq_lock);
#endif
-struct ast_ha {
- /* Host access rule */
- struct in_addr netaddr;
- struct in_addr netmask;
- int sense;
- struct ast_ha *next;
-};
-
/* Default IP - if not otherwise set, don't breathe garbage */
static struct in_addr __ourip = { 0x00000000 };
@@ -102,7 +94,7 @@ void ast_free_ha(struct ast_ha *ha)
}
/* Copy HA structure */
-static void ast_copy_ha(struct ast_ha *from, struct ast_ha *to)
+void ast_copy_ha(const struct ast_ha *from, struct ast_ha *to)
{
memcpy(&to->netaddr, &from->netaddr, sizeof(from->netaddr));
memcpy(&to->netmask, &from->netmask, sizeof(from->netmask));
@@ -141,7 +133,7 @@ struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original)
return ret; /* Return start of list */
}
-struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
+struct ast_ha *ast_append_ha(char *sense, const char *stuff, struct ast_ha *path)
{
struct ast_ha *ha = malloc(sizeof(struct ast_ha));
char *nm = "255.255.255.255";