projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
always call filter_session on CoA
[l2tpns.git]
/
cli.c
diff --git
a/cli.c
b/cli.c
index
37682d6
..
d0f9a8a
100644
(file)
--- a/
cli.c
+++ b/
cli.c
@@
-2,7
+2,7
@@
// vim: sw=8 ts=8
char const *cvs_name = "$Name: $";
// vim: sw=8 ts=8
char const *cvs_name = "$Name: $";
-char const *cvs_id_cli = "$Id: cli.c,v 1.6
2 2005-06-07 05:31:43
bodea Exp $";
+char const *cvs_id_cli = "$Id: cli.c,v 1.6
3 2005-06-28 14:48:17
bodea Exp $";
#include <stdio.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdarg.h>
@@
-2316,17
+2316,6
@@
static int cmd_restart_bgp(struct cli_def *cli, char *command, char **argv, int
#endif /* BGP*/
static int filt;
#endif /* BGP*/
static int filt;
-static int find_access_list(char const *name)
-{
- int i;
-
- for (i = 0; i < MAXFILTER; i++)
- if (!(*ip_filters[i].name && strcmp(ip_filters[i].name, name)))
- return i;
-
- return -1;
-}
-
static int access_list(struct cli_def *cli, char **argv, int argc, int add)
{
int extended;
static int access_list(struct cli_def *cli, char **argv, int argc, int add)
{
int extended;
@@
-2377,7
+2366,7
@@
static int access_list(struct cli_def *cli, char **argv, int argc, int add)
return CLI_OK;
}
return CLI_OK;
}
- filt = find_
access_list(argv[1]
);
+ filt = find_
filter(argv[1], strlen(argv[1])
);
if (add)
{
if (filt < 0)
if (add)
{
if (filt < 0)
@@
-2970,7
+2959,7
@@
static int cmd_filter(struct cli_def *cli, char *command, char **argv, int argc)
return CLI_OK;
}
return CLI_OK;
}
- v = find_
access_list(argv[i+1]
);
+ v = find_
filter(argv[i+1], strlen(argv[i+1])
);
if (v < 0 || !*ip_filters[v].name)
{
cli_error(cli, "Access-list %s not defined", argv[i+1]);
if (v < 0 || !*ip_filters[v].name)
{
cli_error(cli, "Access-list %s not defined", argv[i+1]);
@@
-3046,7
+3035,7
@@
static int cmd_show_access_list(struct cli_def *cli, char *command, char **argv,
for (i = 0; i < argc; i++)
{
for (i = 0; i < argc; i++)
{
- int f = find_
access_list(argv[i]
);
+ int f = find_
filter(argv[i], strlen(argv[i])
);
ip_filter_rulet *rules;
if (f < 0 || !*ip_filters[f].name)
ip_filter_rulet *rules;
if (f < 0 || !*ip_filters[f].name)