diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-03 19:10:21 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-03 19:10:21 +0000 |
commit | fbbafcf2bfae9f0446633803b97079a967b6d109 (patch) | |
tree | d7e4e9a241633175663de32b5a0d40be82f69258 /include | |
parent | e299521659bf793bc7286dc71215ac86abd720a1 (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/tags/1.4.26.2@216015 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/acl.h | 12 | ||||
-rw-r--r-- | include/asterisk/astobj2.h | 10 |
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), + }; /*! |