aboutsummaryrefslogtreecommitdiff
path: root/src/tun/test_regex.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-26 14:57:24 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-26 14:57:24 +0000
commit87b7d2bc3d9cc8c4da313e5dc60fa497d65eb0e2 (patch)
tree83bc7d72ac31fff436525d75d3ddb7b59ba04a7b /src/tun/test_regex.c
parent0c9ca79b2eb820c3266e9117f3ba9179cbdc2ff1 (diff)
-faster port range generation, O(n) instead of O(n^2)
Diffstat (limited to 'src/tun/test_regex.c')
-rw-r--r--src/tun/test_regex.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tun/test_regex.c b/src/tun/test_regex.c
index 341d8b9a09..3f0f898a92 100644
--- a/src/tun/test_regex.c
+++ b/src/tun/test_regex.c
@@ -121,12 +121,17 @@ test_policy6toregex (const char *policy,
int
main (int argc, char *argv[])
{
- GNUNET_log_setup ("test-regex", "WARNING", NULL);
-
int error;
+ char *r;
+ GNUNET_log_setup ("test-regex", "WARNING", NULL);
error = 0;
+ /* this is just a performance test ... */
+ r = GNUNET_TUN_ipv4policy2regex ("1.2.3.4/16:!25;");
+ GNUNET_break (NULL != r);
+ GNUNET_free (r);
+
error +=
test_iptoregex ("192.1.2.3", 2086,
"4-0826-C0010203",