projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug fix
[l2tpns.git]
/
radius.c
diff --git
a/radius.c
b/radius.c
index
9c8d444
..
ce1d39e
100644
(file)
--- a/
radius.c
+++ b/
radius.c
@@
-1,6
+1,6
@@
// L2TPNS Radius Stuff
// L2TPNS Radius Stuff
-char const *cvs_id_radius = "$Id: radius.c,v 1.
38 2005/07/31 10:35:3
9 bodea Exp $";
+char const *cvs_id_radius = "$Id: radius.c,v 1.
41 2005/08/31 12:41:0
9 bodea Exp $";
#include <time.h>
#include <stdio.h>
#include <time.h>
#include <stdio.h>
@@
-13,7
+13,7
@@
char const *cvs_id_radius = "$Id: radius.c,v 1.38 2005/07/31 10:35:39 bodea Exp
#include <ctype.h>
#include <netinet/in.h>
#include <errno.h>
#include <ctype.h>
#include <netinet/in.h>
#include <errno.h>
-#include
<openssl/md5.h>
+#include
"md5.h"
#include "constants.h"
#include "l2tpns.h"
#include "plugin.h"
#include "constants.h"
#include "l2tpns.h"
#include "plugin.h"
@@
-414,7
+414,7
@@
static void handle_avpair(sessionidt s, uint8_t *avp, int len)
// process RADIUS response
void processrad(uint8_t *buf, int len, char socket_index)
{
// process RADIUS response
void processrad(uint8_t *buf, int len, char socket_index)
{
- uint8_t b[MAX
CONTROL
];
+ uint8_t b[MAX
ETHER
];
MD5_CTX ctx;
uint16_t r;
sessionidt s;
MD5_CTX ctx;
uint16_t r;
sessionidt s;
@@
-493,7
+493,7
@@
void processrad(uint8_t *buf, int len, char socket_index)
if (radius[r].chap)
{
// CHAP
if (radius[r].chap)
{
// CHAP
- uint8_t *p = makeppp(b, sizeof(b), 0, 0,
t, s
, PPPCHAP);
+ uint8_t *p = makeppp(b, sizeof(b), 0, 0,
s, t
, PPPCHAP);
if (!p) return; // Abort!
*p = (r_code == AccessAccept) ? 3 : 4; // ack/nak
if (!p) return; // Abort!
*p = (r_code == AccessAccept) ? 3 : 4; // ack/nak
@@
-507,7
+507,7
@@
void processrad(uint8_t *buf, int len, char socket_index)
else
{
// PAP
else
{
// PAP
- uint8_t *p = makeppp(b, sizeof(b), 0, 0,
t, s
, PPPPAP);
+ uint8_t *p = makeppp(b, sizeof(b), 0, 0,
s, t
, PPPPAP);
if (!p) return; // Abort!
// ack/nak
if (!p) return; // Abort!
// ack/nak
@@
-712,7
+712,7
@@
void processrad(uint8_t *buf, int len, char socket_index)
// Valid Session, set it up
session[s].unique_id = 0;
// Valid Session, set it up
session[s].unique_id = 0;
- sessionsetup(
t, s
);
+ sessionsetup(
s, t
);
}
else
{
}
else
{
@@
-739,7
+739,7
@@
void radiusretry(uint16_t r)
switch (radius[r].state)
{
case RADIUSCHAP: // sending CHAP down PPP
switch (radius[r].state)
{
case RADIUSCHAP: // sending CHAP down PPP
- sendchap(
t, s
);
+ sendchap(
s, t
);
break;
case RADIUSAUTH: // sending auth to RADIUS server
case RADIUSSTART: // sending start accounting to RADIUS server
break;
case RADIUSAUTH: // sending auth to RADIUS server
case RADIUSSTART: // sending start accounting to RADIUS server