exclude counter when comparing filter rules
authorBrendan O'Dea <bod@optus.net>
Mon, 14 Nov 2005 09:49:01 +0000 (09:49 +0000)
committerBrendan O'Dea <bod@optus.net>
Mon, 14 Nov 2005 09:49:01 +0000 (09:49 +0000)
Changes
cli.c

diff --git a/Changes b/Changes
index 2e4efa7..40f7944 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
 * Mon Nov 14 2005 Brendan O'Dea <bod@optus.net> 2.1.11
 - Fix fragment handling in ip_filter.
+- Exclude counter when comparing filter rules.
 
 * Sat Nov 5 2005 Brendan O'Dea <bod@optus.net> 2.1.10
 - Add scripts/l2tpns-capture.
diff --git a/cli.c b/cli.c
index dcde349..de36f0a 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -2,9 +2,10 @@
 // vim: sw=8 ts=8
 
 char const *cvs_name = "$Name:  $";
-char const *cvs_id_cli = "$Id: cli.c,v 1.66 2005-09-01 06:59:06 bodea Exp $";
+char const *cvs_id_cli = "$Id: cli.c,v 1.67 2005-11-14 09:49:01 bodea Exp $";
 
 #include <stdio.h>
+#include <stddef.h>
 #include <stdarg.h>
 #include <unistd.h>
 #include <sys/file.h>
@@ -2884,7 +2885,7 @@ static int cmd_ip_access_list_rule(struct cli_def *cli, char *command, char **ar
                        return CLI_OK;
                }
 
-               if (!memcmp(&ip_filters[filt].rules[i], rule, sizeof(*rule)))
+               if (!memcmp(&ip_filters[filt].rules[i], rule, offsetof(ip_filter_rulet, counter)))
                        return CLI_OK;
        }