[asterisk-commits] mmichelson: branch mmichelson/acl-v6 r276251 - /team/mmichelson/acl-v6/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 13 17:47:42 CDT 2010
Author: mmichelson
Date: Tue Jul 13 17:47:31 2010
New Revision: 276251
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=276251
Log:
Be sure to set the error flag if ast_append_ha fails.
Modified:
team/mmichelson/acl-v6/main/acl.c
Modified: team/mmichelson/acl-v6/main/acl.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/acl-v6/main/acl.c?view=diff&rev=276251&r1=276250&r2=276251
==============================================================================
--- team/mmichelson/acl-v6/main/acl.c (original)
+++ team/mmichelson/acl-v6/main/acl.c Tue Jul 13 17:47:31 2010
@@ -445,6 +445,7 @@
if (!ast_sockaddr_parse(&addr_sock, address, PARSE_PORT_FORBID)) {
ast_log(LOG_WARNING, "Invalid IP address: %s\n", address);
ast_free_ha(ha);
+ *error = 1;
return ret;
}
@@ -463,12 +464,14 @@
if (ast_sockaddr_parse(&mask_sock, mask, PARSE_PORT_FORBID)) {
ast_log(LOG_WARNING, "Invalid netmask: %s\n", mask);
ast_free_ha(ha);
+ *error = 1;
return ret;
}
mask_is_v4 = ast_sockaddr_is_ipv4(&mask_sock);
if (addr_is_v4 ^ mask_is_v4) {
ast_log(LOG_WARNING, "Address and mask are not using same address scheme.\n");
ast_free_ha(ha);
+ *error = 1;
return ret;
}
if (mask_is_v4) {
@@ -477,6 +480,7 @@
} else if (parse_cidr_mask(&ha->netmask, addr_is_v4, mask)) {
ast_log(LOG_WARNING, "Invalid CIDR netmask: %s", mask);
ast_free_ha(ha);
+ *error = 1;
return ret;
}
More information about the asterisk-commits
mailing list