X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/e9f834555d611df8c2f1bf7d1bef0c4827595617..41d3f664588379a4b656dbf1b3b5626ffe0ce129:/cli.c diff --git a/cli.c b/cli.c index edccf11..34038ef 100644 --- 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.65 2005/08/10 07:53:56 bodea Exp $"; +char const *cvs_id_cli = "$Id: cli.c,v 1.68 2005/11/14 20:19:08 bodea Exp $"; #include +#include #include #include #include @@ -1938,7 +1939,7 @@ int regular_stuff(struct cli_def *cli) if (!show) continue; if (!(p = strchr(m, '\n'))) - p = m + strlen(p); + p = m + strlen(m); cli_error(cli, "\r%s-%u-%u %.*s", debug_levels[(int)ringbuffer->buffer[i].level], @@ -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; } @@ -3068,7 +3069,7 @@ static int cmd_show_access_list(struct cli_def *cli, char *command, char **argv, { char const *r = show_access_list_rule(ip_filters[f].extended, rules); if (rules->counter) - cli_print(cli, "%s (%d match%s)", r, + cli_print(cli, "%s (%u match%s)", r, rules->counter, rules->counter > 1 ? "es" : ""); else cli_print(cli, "%s", r);