// vim: sw=8 ts=8
char const *cvs_name = "$Name: $";
-char const *cvs_id_cli = "$Id: cli.c,v 1.30 2004-11-27 20:41:41 bodea Exp $";
+char const *cvs_id_cli = "$Id: cli.c,v 1.31 2004-11-27 21:10:50 bodea Exp $";
#include <stdio.h>
#include <stdarg.h>
cli_print(cli, "\tRx Speed:\t%lu", session[s].rx_connect_speed);
cli_print(cli, "\tTx Speed:\t%lu", session[s].tx_connect_speed);
if (session[s].filter_in && session[s].filter_in <= MAXFILTER)
- cli_print(cli, "\tFilter in:\t%u (%s)", session[s].filter_in, filters[session[s].filter_in-1].name);
+ cli_print(cli, "\tFilter in:\t%u (%s)", session[s].filter_in, ip_filters[session[s].filter_in-1].name);
if (session[s].filter_out && session[s].filter_out <= MAXFILTER)
- cli_print(cli, "\tFilter out:\t%u (%s)", session[s].filter_out, filters[session[s].filter_out-1].name);
+ cli_print(cli, "\tFilter out:\t%u (%s)", session[s].filter_out, ip_filters[session[s].filter_out-1].name);
if (session[s].snoop_ip && session[s].snoop_port)
cli_print(cli, "\tIntercepted:\t%s:%d", inet_toa(session[s].snoop_ip), session[s] .snoop_port);
else
}
else
{
- if (++a >= argc)
+ if (a >= argc - 1)
{
cli_print(cli, "Specify %s ip address and wildcard", i ? "destination" : "source");
return NULL;
}
*wild = addr.s_addr;
+ a++;
}
if (rule.proto == IPPROTO_IP || a >= argc)
// L2TPNS Radius Stuff
-char const *cvs_id_radius = "$Id: radius.c,v 1.15 2004-11-27 20:42:02 bodea Exp $";
+char const *cvs_id_radius = "$Id: radius.c,v 1.16 2004-11-27 21:10:51 bodea Exp $";
#include <time.h>
#include <stdio.h>
extern u32 sessionid;
extern configt *config;
extern int *radfds;
+extern ip_filtert *ip_filters;
static const char *radius_state(int state)
{
// Filter-Id
char *filter = p + 2;
int l = p[1] - 2;
- char *s;
+ char *suffix;
u8 *f = 0;
int i;
LOG(3, 0, s, session[s].tunnel, " Radius reply contains Filter-Id \"%.*s\"\n", l, filter);
- if ((s = memchr(filter, '.', l)))
+ if ((suffix = memchr(filter, '.', l)))
{
- int b = s - filter;
- if (l - b == 3 && !memcmp("in", s+1, 2))
+ int b = suffix - filter;
+ if (l - b == 3 && !memcmp("in", suffix+1, 2))
f = &session[s].filter_in;
- else if (l - b == 4 && !memcmp("out", s+1, 3))
+ else if (l - b == 4 && !memcmp("out", suffix+1, 3))
f = &session[s].filter_out;
l = b;