aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-03 18:32:32 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-03 18:32:32 +0000
commit06075d395bfe1e7141986fe6387eefef5a76cb56 (patch)
tree7c14f167d74b6a5759b0caf85b652004a7c1363a /include
parent994fc0a8e68e99dbc8a8b0b3d9693b676861443d (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.4@216000 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/acl.h12
-rw-r--r--include/asterisk/astobj2.h10
2 files changed, 19 insertions, 3 deletions
diff --git a/include/asterisk/acl.h b/include/asterisk/acl.h
index f9114ce11..d3e7a4f5a 100644
--- a/include/asterisk/acl.h
+++ b/include/asterisk/acl.h
@@ -35,11 +35,17 @@ extern "C" {
#define AST_SENSE_ALLOW 1
/* Host based access control */
-
-struct ast_ha;
+struct ast_ha {
+ /* Host access rule */
+ struct in_addr netaddr;
+ struct in_addr netmask;
+ int sense;
+ struct ast_ha *next;
+};
void ast_free_ha(struct ast_ha *ha);
-struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path);
+void ast_copy_ha(const struct ast_ha *from, struct ast_ha *to);
+struct ast_ha *ast_append_ha(char *sense, const char *stuff, struct ast_ha *path);
int ast_apply_ha(struct ast_ha *ha, struct sockaddr_in *sin);
int ast_get_ip(struct sockaddr_in *sin, const char *value);
int ast_get_ip_or_srv(struct sockaddr_in *sin, const char *value, const char *service);
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h
index ec841b888..91836b9e7 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -290,6 +290,16 @@ enum search_flags {
* This implies that it can be passed to the object's hash function
* for optimized searching. */
OBJ_POINTER = (1 << 3),
+ /*!
+ * \brief Continue if a match is not found in the hashed out bucket
+ *
+ * This flag is to be used in combination with OBJ_POINTER. This tells
+ * the ao2_callback() core to keep searching through the rest of the
+ * buckets if a match is not found in the starting bucket defined by
+ * the hash value on the argument.
+ */
+ OBJ_CONTINUE = (1 << 4),
+
};
/*!