projects
/
l2tpns.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4554641
)
fix RADIUS indexing (should have 16K entries with 64 sockets)
author
bodea
<bodea>
Mon, 16 May 2005 04:51:42 +0000
(
04:51
+0000)
committer
bodea
<bodea>
Mon, 16 May 2005 04:51:42 +0000
(
04:51
+0000)
l2tpns.c
patch
|
blob
|
history
l2tpns.h
patch
|
blob
|
history
diff --git
a/l2tpns.c
b/l2tpns.c
index
200ae0a
..
70d0c70
100644
(file)
--- a/
l2tpns.c
+++ b/
l2tpns.c
@@
-4,7
+4,7
@@
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
// vim: sw=8 ts=8
// Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced
// vim: sw=8 ts=8
-char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.73.2.
8 2005/05/07 03:51:21
bodea Exp $";
+char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.73.2.
9 2005/05/16 04:51:42
bodea Exp $";
#include <arpa/inet.h>
#include <assert.h>
#include <arpa/inet.h>
#include <assert.h>
@@
-1212,7
+1212,7
@@
void sendipcp(tunnelidt t, sessionidt s)
if (!q) return;
*q = ConfigReq;
if (!q) return;
*q = ConfigReq;
- q[1] = r
<<
RADIUS_SHIFT; // ID, dont care, we only send one type of request
+ q[1] = r
>>
RADIUS_SHIFT; // ID, dont care, we only send one type of request
*(uint16_t *) (q + 2) = htons(10);
q[4] = 3;
q[5] = 6;
*(uint16_t *) (q + 2) = htons(10);
q[4] = 3;
q[5] = 6;
@@
-3658,7
+3658,7
@@
static void update_config()
if (!config->numradiusservers)
LOG(0, 0, 0, "No RADIUS servers defined!\n");
if (!config->numradiusservers)
LOG(0, 0, 0, "No RADIUS servers defined!\n");
- config->num_radfds =
2
<< RADIUS_SHIFT;
+ config->num_radfds =
1
<< RADIUS_SHIFT;
// Update plugins
for (i = 0; i < MAXPLUGINS; i++)
// Update plugins
for (i = 0; i < MAXPLUGINS; i++)
diff --git
a/l2tpns.h
b/l2tpns.h
index
3c389d2
..
7f7ecf5
100644
(file)
--- a/
l2tpns.h
+++ b/
l2tpns.h
@@
-1,5
+1,5
@@
// L2TPNS Global Stuff
// L2TPNS Global Stuff
-// $Id: l2tpns.h,v 1.49.2.
7 2005/05/07 03:51:24
bodea Exp $
+// $Id: l2tpns.h,v 1.49.2.
8 2005/05/16 04:51:42
bodea Exp $
#ifndef __L2TPNS_H__
#define __L2TPNS_H__
#ifndef __L2TPNS_H__
#define __L2TPNS_H__
@@
-22,9
+22,9
@@
#define MAXSESSION 60000 // could be up to 65535
#define MAXTBFS 6000 // Maximum token bucket filters. Might need up to 2 * session.
#define MAXSESSION 60000 // could be up to 65535
#define MAXTBFS 6000 // Maximum token bucket filters. Might need up to 2 * session.
-#define RADIUS_SHIFT
5
-#define RADIUS_MASK ((
unsigned short)(((unsigned short)~0) >> (16 - RADIUS_SHIFT))
)
-#define
MAXRADIUS ((unsigned long)(1L << RADIUS_SHIFT) * 255
)
+#define RADIUS_SHIFT
6
+#define RADIUS_MASK ((
1 << RADIUS_SHIFT) - 1
)
+#define
MAXRADIUS ((1 << (RADIUS_SHIFT + 8)) - 1
)
#define T_UNDEF (0xffff) // A tunnel ID that won't ever be used. Mark session as undefined.
#define T_FREE (0) // A tunnel ID that won't ever be used. Mark session as free.
#define T_UNDEF (0xffff) // A tunnel ID that won't ever be used. Mark session as undefined.
#define T_FREE (0) // A tunnel ID that won't ever be used. Mark session as free.