mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Merge code associated with AST-2009-006
(closes issue #12912) Reported by: rathaus Tested by: tilghman, russell, dvossel, dbrooks git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@216000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
|
@@ -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),
|
||||
|
||||
};
|
||||
|
||||
/*!
|
||||
|
Reference in New Issue
Block a user