Don't use configure it's a waste of time
This commit is contained in:
parent
fcb4992301
commit
8e8ea0e534
11 changed files with 36 additions and 7409 deletions
|
|
@ -1,19 +1,13 @@
|
|||
subdirs = @subdirs@
|
||||
top_srcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
infodir = @infodir@
|
||||
etcdir = @sysconfdir@
|
||||
libdir = @prefix@/lib/l2tpns
|
||||
PREFIX=
|
||||
bindir = $(PREFIX)/usr/sbin
|
||||
etcdir = $(PREFIX)/etc/l2tpns
|
||||
libdir = $(PREFIX)/usr/lib/l2tpns
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS=-Wall @CFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
INSTALL = @INSTALL@
|
||||
DEFS = @DEFS@
|
||||
CC = gcc
|
||||
CFLAGS=-Wall -g -O2
|
||||
LDFLAGS =
|
||||
LIBS = -lm -ldl -lcli
|
||||
INSTALL = /usr/bin/install -c
|
||||
|
||||
OBJS= md5.o \
|
||||
icmp.o \
|
||||
|
|
@ -48,9 +42,6 @@ nsctl: nsctl.o control.o
|
|||
clean:
|
||||
/bin/rm -f *.o *.so l2tpns cluster_master nsctl
|
||||
|
||||
distclean:
|
||||
/bin/rm -f Makefile config.h config.status config.cache config.log
|
||||
|
||||
install: all
|
||||
$(INSTALL) -D -o root -g root -m 0755 l2tpns $(bindir)/l2tpns
|
||||
$(INSTALL) -D -o root -g root -m 0755 cluster_master $(bindir)/cluster_master
|
||||
10
cli.c
10
cli.c
|
|
@ -1,5 +1,5 @@
|
|||
// L2TPNS Command Line Interface
|
||||
// $Id: cli.c,v 1.2 2004/03/05 00:09:03 fred_nerk Exp $
|
||||
// $Id: cli.c,v 1.3 2004/03/05 00:22:06 fred_nerk Exp $
|
||||
// vim: sw=4 ts=8
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -39,7 +39,7 @@ extern char hostname[];
|
|||
extern struct Tringbuffer *ringbuffer;
|
||||
#endif
|
||||
|
||||
char *rcs_id = "$Id: cli.c,v 1.2 2004/03/05 00:09:03 fred_nerk Exp $";
|
||||
char *rcs_id = "$Id: cli.c,v 1.3 2004/03/05 00:22:06 fred_nerk Exp $";
|
||||
|
||||
char *debug_levels[] = {
|
||||
"CRIT",
|
||||
|
|
@ -290,7 +290,7 @@ int cmd_show_session(struct cli_def *cli, char *command, char **argv, int argc)
|
|||
cli_print(cli, " Tx Speed: %lu", session[s].tx_connect_speed);
|
||||
cli_print(cli, " Intercepted: %s", session[s].snoop ? "YES" : "no");
|
||||
cli_print(cli, " Throttled: %s", session[s].throttle ? "YES" : "no");
|
||||
cli_print(cli, " Servicenet: %s", session[s].servicenet ? "YES" : "no");
|
||||
cli_print(cli, " Walled Garden: %s", session[s].walled_garden ? "YES" : "no");
|
||||
cli_print(cli, " Filter Bucket: %s", session[s].tbf ? filter_buckets[session[s].tbf].handle : "none");
|
||||
}
|
||||
return CLI_OK;
|
||||
|
|
@ -304,7 +304,7 @@ int cmd_show_session(struct cli_def *cli, char *command, char **argv, int argc)
|
|||
"IP",
|
||||
"I",
|
||||
"T",
|
||||
"S",
|
||||
"G",
|
||||
"opened",
|
||||
"downloaded",
|
||||
"uploaded",
|
||||
|
|
@ -324,7 +324,7 @@ int cmd_show_session(struct cli_def *cli, char *command, char **argv, int argc)
|
|||
userip,
|
||||
(session[i].snoop) ? "Y" : "N",
|
||||
(session[i].throttle) ? "Y" : "N",
|
||||
(session[i].servicenet) ? "Y" : "N",
|
||||
(session[i].walled_garden) ? "Y" : "N",
|
||||
abs(time_now - (unsigned long)session[i].opened),
|
||||
(unsigned long)session[i].total_cout,
|
||||
(unsigned long)session[i].total_cin,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// L2TPNS Cluster Master
|
||||
// $Id: cluster_slave.c,v 1.2 2004/03/05 00:09:03 fred_nerk Exp $
|
||||
// $Id: cluster_slave.c,v 1.3 2004/03/05 00:22:06 fred_nerk Exp $
|
||||
|
||||
#include <stdio.h>
|
||||
#include <netinet/in.h>
|
||||
|
|
@ -164,10 +164,6 @@ int handle_session(char *buf, int l)
|
|||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (session[s].servicenet)
|
||||
servicenet_session(s, 1);
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
3
config.h
Normal file
3
config.h
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#define LIBDIR "/usr/lib/l2tpns"
|
||||
#define ETCDIR "/etc/l2tpns"
|
||||
#define BINDIR "/usr/sbin"
|
||||
213
config.h.in
213
config.h.in
|
|
@ -1,213 +0,0 @@
|
|||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the `alarm' function. */
|
||||
#undef HAVE_ALARM
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
|
||||
#undef HAVE_DOPRNT
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
#undef HAVE_FORK
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
#undef HAVE_GETHOSTBYNAME
|
||||
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa' function. */
|
||||
#undef HAVE_INET_NTOA
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the `pow' function. */
|
||||
#undef HAVE_POW
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#undef HAVE_SELECT
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define to 1 if `stat' has the bug that it succeeds when given the
|
||||
zero-length file name argument. */
|
||||
#undef HAVE_STAT_EMPTY_STRING_BUG
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#undef HAVE_STRFTIME
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#undef HAVE_STRRCHR
|
||||
|
||||
/* Define to 1 if you have the <sys/file.h> header file. */
|
||||
#undef HAVE_SYS_FILE_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `vfork' function. */
|
||||
#undef HAVE_VFORK
|
||||
|
||||
/* Define to 1 if you have the <vfork.h> header file. */
|
||||
#undef HAVE_VFORK_H
|
||||
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define to 1 if `fork' works. */
|
||||
#undef HAVE_WORKING_FORK
|
||||
|
||||
/* Define to 1 if `vfork' works. */
|
||||
#undef HAVE_WORKING_VFORK
|
||||
|
||||
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
|
||||
slash. */
|
||||
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if the C compiler supports function prototypes. */
|
||||
#undef PROTOTYPES
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to the type of arg 1 for `select'. */
|
||||
#undef SELECT_TYPE_ARG1
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for `select'. */
|
||||
#undef SELECT_TYPE_ARG234
|
||||
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#undef SELECT_TYPE_ARG5
|
||||
|
||||
/* Define to 1 if the `setvbuf' function takes the buffering type as its
|
||||
second argument and the buffer pointer as the third, as on System V before
|
||||
release 3. */
|
||||
#undef SETVBUF_REVERSED
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define like PROTOTYPES; this can be used by system headers. */
|
||||
#undef __PROTOTYPES
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef pid_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define as `fork' if `vfork' does not work. */
|
||||
#undef vfork
|
||||
|
||||
#undef HAVE_LIBCLI
|
||||
#undef HAVE_LIBM
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
#undef LIBDIR
|
||||
#undef ETCDIR
|
||||
#undef BINDIR
|
||||
|
||||
48
configure.in
48
configure.in
|
|
@ -1,48 +0,0 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.58)
|
||||
AC_INIT([l2tpns], [1.0.0], [fred_nerk@sourceforge.net])
|
||||
AC_CONFIG_SRCDIR([ll.c])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h memory.h netdb.h netinet/in.h stdlib.h string.h sys/file.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_FORK
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_FUNC_SETVBUF_REVERSED
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_STAT
|
||||
AC_FUNC_STRFTIME
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS([alarm gethostbyname gethostname gettimeofday inet_ntoa memset pow select socket strcasecmp strchr strdup strerror strrchr])
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([cli], [cli_init])
|
||||
AC_CHECK_LIB([dl], [dlopen])
|
||||
AC_CHECK_LIB([m], [pow])
|
||||
|
||||
AC_DEFINE_UNQUOTED(LIBDIR, ["$prefix/lib/l2tpns"])
|
||||
AC_DEFINE_UNQUOTED(ETCDIR, ["$sysconfdir"])
|
||||
AC_DEFINE_UNQUOTED(BINDIR, ["$prefix/bin"])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
12
garden.c
12
garden.c
|
|
@ -34,19 +34,19 @@ int plugin_post_auth(struct param_post_auth *data)
|
|||
|
||||
p.log(3, 0, 0, 0, "Walled Garden allowing login\n");
|
||||
data->auth_allowed = 1;
|
||||
data->s->garden = 1;
|
||||
data->s->walled_garden = 1;
|
||||
return PLUGIN_RET_OK;
|
||||
}
|
||||
|
||||
int plugin_new_session(struct param_new_session *data)
|
||||
{
|
||||
if (data->s->garden) garden_session(data->s, 1);
|
||||
if (data->s->walled_garden) garden_session(data->s, 1);
|
||||
return PLUGIN_RET_OK;
|
||||
}
|
||||
|
||||
int plugin_kill_session(struct param_new_session *data)
|
||||
{
|
||||
if (data->s->garden) garden_session(data->s, 0);
|
||||
if (data->s->walled_garden) garden_session(data->s, 0);
|
||||
return PLUGIN_RET_OK;
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ int garden_session(sessiont *s, int flag)
|
|||
snprintf(cmd, 2048, "iptables -t nat -A garden_users -s %s -j garden", p.inet_toa(ntohl(s->ip)));
|
||||
p.log(3, 0, 0, s->tunnel, "%s\n", cmd);
|
||||
system(cmd);
|
||||
s->garden = 1;
|
||||
s->walled_garden = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -145,7 +145,7 @@ int garden_session(sessiont *s, int flag)
|
|||
if (WEXITSTATUS(status) != 0) break;
|
||||
}
|
||||
|
||||
s->garden = 0;
|
||||
s->walled_garden = 0;
|
||||
|
||||
if (!s->die) {
|
||||
/* OK, we're up! */
|
||||
|
|
@ -153,7 +153,7 @@ int garden_session(sessiont *s, int flag)
|
|||
p.radiussend(r, RADIUSSTART);
|
||||
}
|
||||
}
|
||||
s->garden = flag;
|
||||
s->walled_garden = flag;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
16
l2tpns.c
16
l2tpns.c
|
|
@ -417,7 +417,7 @@ sessionidt sessionbyuser(char *username)
|
|||
#ifdef STAT_CALLS
|
||||
STAT(call_sessionbyuser);
|
||||
#endif
|
||||
for (s = 1; s < MAXSESSION && (session[s].servicenet || strncmp(session[s].user, username, 128)); s++);
|
||||
for (s = 1; s < MAXSESSION && (session[s].walled_garden || strncmp(session[s].user, username, 128)); s++);
|
||||
if (s < MAXSESSION)
|
||||
return s;
|
||||
return 0;
|
||||
|
|
@ -770,7 +770,7 @@ void controladd(controlt * c, tunnelidt t, sessionidt s)
|
|||
void sessionshutdown(sessionidt s, char *reason)
|
||||
{
|
||||
int dead = session[s].die;
|
||||
int servicenet = session[s].servicenet;
|
||||
int walled_garden = session[s].walled_garden;
|
||||
|
||||
#ifdef STAT_CALLS
|
||||
STAT(call_sessionshutdown);
|
||||
|
|
@ -789,7 +789,7 @@ void sessionshutdown(sessionidt s, char *reason)
|
|||
}
|
||||
|
||||
// RADIUS Stop message
|
||||
if (session[s].opened && !servicenet && !dead) {
|
||||
if (session[s].opened && !walled_garden && !dead) {
|
||||
u8 r = session[s].radius;
|
||||
if (!r)
|
||||
{
|
||||
|
|
@ -1970,7 +1970,7 @@ int assign_ip_address(sessionidt s)
|
|||
if (!ip_address_pool[i].address || ip_address_pool[i].assigned)
|
||||
continue;
|
||||
|
||||
if (!session[s].servicenet && ip_address_pool[i].user[0] && !strcmp(u, ip_address_pool[i].user))
|
||||
if (!session[s].walled_garden && ip_address_pool[i].user[0] && !strcmp(u, ip_address_pool[i].user))
|
||||
{
|
||||
best = i;
|
||||
reuse = 1;
|
||||
|
|
@ -1995,7 +1995,7 @@ int assign_ip_address(sessionidt s)
|
|||
session[s].ip_pool_index = best;
|
||||
ip_address_pool[best].assigned = 1;
|
||||
ip_address_pool[best].last = time_now;
|
||||
if (session[s].servicenet)
|
||||
if (session[s].walled_garden)
|
||||
/* Don't track addresses of users in walled garden (note: this
|
||||
means that their address isn't "sticky" even if they get
|
||||
un-gardened). */
|
||||
|
|
@ -2145,7 +2145,7 @@ void dump_acct_info()
|
|||
|
||||
for (i = 0; i < MAXSESSION; i++)
|
||||
{
|
||||
if (!session[i].opened || !session[i].cin || !session[i].cout || !*session[i].user || session[i].servicenet)
|
||||
if (!session[i].opened || !session[i].cin || !session[i].cout || !*session[i].user || session[i].walled_garden)
|
||||
continue;
|
||||
if (!f)
|
||||
{
|
||||
|
|
@ -2240,7 +2240,7 @@ int main(int argc, char *argv[])
|
|||
initdata();
|
||||
init_cli();
|
||||
read_config_file();
|
||||
log(0, 0, 0, 0, "$Id: l2tpns.c,v 1.2 2004/03/05 00:09:03 fred_nerk Exp $\n(c) Copyright 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced\n");
|
||||
log(0, 0, 0, 0, "$Id: l2tpns.c,v 1.3 2004/03/05 00:22:06 fred_nerk Exp $\n(c) Copyright 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced\n");
|
||||
|
||||
/* Start up the cluster first, so that we don't have two machines with
|
||||
* the same IP at once.
|
||||
|
|
@ -2700,7 +2700,7 @@ int sessionsetup(tunnelidt t, sessionidt s, u8 routes)
|
|||
{
|
||||
if (i == s) continue;
|
||||
if (ip == session[i].ip) sessionkill(i, "Duplicate IP address");
|
||||
if (!session[s].servicenet && !session[i].servicenet && strcasecmp(user, session[i].user) == 0)
|
||||
if (!session[s].walled_garden && !session[i].walled_garden && strcasecmp(user, session[i].user) == 0)
|
||||
sessionkill(i, "Duplicate session for user");
|
||||
}
|
||||
|
||||
|
|
|
|||
4
l2tpns.h
4
l2tpns.h
|
|
@ -1,5 +1,5 @@
|
|||
// L2TPNS Global Stuff
|
||||
// $Id: l2tpns.h,v 1.2 2004/03/05 00:09:03 fred_nerk Exp $
|
||||
// $Id: l2tpns.h,v 1.3 2004/03/05 00:22:06 fred_nerk Exp $
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -132,7 +132,7 @@ typedef struct sessions
|
|||
u8 flags; // various bit flags
|
||||
u8 snoop; // are we snooping this session?
|
||||
u8 throttle; // is this session throttled?
|
||||
u8 servicenet; // is this session servicenetted?
|
||||
u8 walled_garden; // is this session gardened?
|
||||
u16 mru; // maximum receive unit
|
||||
u16 tbf; // filter bucket for throttling
|
||||
char random_vector[MAXTEL];
|
||||
|
|
|
|||
4
ppp.c
4
ppp.c
|
|
@ -1,5 +1,5 @@
|
|||
// L2TPNS PPP Stuff
|
||||
// $Id: ppp.c,v 1.2 2004/03/05 00:09:03 fred_nerk Exp $
|
||||
// $Id: ppp.c,v 1.3 2004/03/05 00:22:06 fred_nerk Exp $
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
@ -438,7 +438,7 @@ void processipcp(tunnelidt t, sessionidt s, u8 * p, u16 l)
|
|||
if (*p == ConfigAck)
|
||||
{ // happy with our IPCP
|
||||
u8 r = session[s].radius;
|
||||
if ((!r || radius[r].state == RADIUSIPCP) && !session[s].servicenet)
|
||||
if ((!r || radius[r].state == RADIUSIPCP) && !session[s].walled_garden)
|
||||
if (!r)
|
||||
r = radiusnew(s);
|
||||
if (r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue