[asterisk-commits] mmichelson: branch mmichelson/acl-v6 r276252 - /team/mmichelson/acl-v6/tests/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 13 17:58:49 CDT 2010


Author: mmichelson
Date: Tue Jul 13 17:58:38 2010
New Revision: 276252

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=276252
Log:
Add new test cases to invalid_acl and add comments explaining failures.


Modified:
    team/mmichelson/acl-v6/tests/test_acl.c

Modified: team/mmichelson/acl-v6/tests/test_acl.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/acl-v6/tests/test_acl.c?view=diff&rev=276252&r1=276251&r2=276252
==============================================================================
--- team/mmichelson/acl-v6/tests/test_acl.c (original)
+++ team/mmichelson/acl-v6/tests/test_acl.c Tue Jul 13 17:58:38 2010
@@ -41,17 +41,40 @@
 AST_TEST_DEFINE(invalid_acl)
 {
 	const char * invalid_acls[] = {
+		/* Negative netmask */
 		"1.3.3.7/-1",
+		/* Netmask too large */
 		"1.3.3.7/33",
+		/* Netmask waaaay too large */
 		"1.3.3.7/92342348927389492307420",
+		/* Netmask non-numeric */
 		"1.3.3.7/California",
+		/* Too many octets in Netmask */
 		"1.3.3.7/255.255.255.255.255",
+		/* Octets in IP address exceed 255 */
 		"57.60.278.900/31",
+		/* Octets in IP address exceed 255 and are negative */
 		"400.32.201029.-6/24",
+		/* Invalidly formatted IP address */
 		"EGGSOFDEATH/4000",
+		/* Too many octets in IP address */
 		"33.4.7.8.3/300030",
+		/* Too many octets in Netmask */
 		"1.2.3.4/6.7.8.9.0",
+		/* Too many octets in IP address */
 		"3.1.4.1.5.9/3",
+		/* IPv6 address has multiple double colons */
+		"ff::ff::ff/3",
+		/* IPv6 address is too long */
+		"1234:5678:90ab:cdef:1234:5678:90ab:cdef:1234/56",
+		/* IPv6 netmask is too large */
+		"::ffff/129",
+		/* IPv4-mapped IPv6 address has too few octets */
+		"::ffff:255.255.255/128",
+		/* Leading and trailing colongs for IPv6 address */
+		":1234:/15",
+		/* IPv6 address and IPv4 netmask */
+		"::ffff/255.255.255.0",
 	};
 
 	enum ast_test_result_state res = AST_TEST_PASS;




More information about the asterisk-commits mailing list