From 702ae1fe5e2976e49d387d42dc8927878cb493a3 Mon Sep 17 00:00:00 2001 From: bodea Date: Tue, 3 May 2005 05:10:51 +0000 Subject: [PATCH] Add a Cisco-Avpair with intercept details to RADIUS Start/Stop records --- Changes | 4 ++++ l2tpns.h | 4 ++-- l2tpns.spec | 6 +++--- radius.c | 14 +++++++++++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Changes b/Changes index 4dfc1eb..274e066 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +* Tue May 3 2005 Brendan O'Dea 2.0.18 +- Add a Cisco-Avpair with intercept details to RADIUS Start/Stop + records. + * Mon May 2 2005 Brendan O'Dea 2.0.17 - Only send RADIUS stop record in sessionshutdown when there's an ip address. - Reset .die on master takeover (so that dying sessions don't have to diff --git a/l2tpns.h b/l2tpns.h index b2d5afb..f9dfd32 100644 --- a/l2tpns.h +++ b/l2tpns.h @@ -1,5 +1,5 @@ // L2TPNS Global Stuff -// $Id: l2tpns.h,v 1.49.2.5 2005/04/01 08:54:12 bodea Exp $ +// $Id: l2tpns.h,v 1.49.2.6 2005/05/03 05:10:52 bodea Exp $ #ifndef __L2TPNS_H__ #define __L2TPNS_H__ @@ -15,7 +15,7 @@ #include #include -#define VERSION "2.0.17" +#define VERSION "2.0.18" // Limits #define MAXTUNNEL 500 // could be up to 65535 diff --git a/l2tpns.spec b/l2tpns.spec index 3ca85db..4cc064f 100644 --- a/l2tpns.spec +++ b/l2tpns.spec @@ -1,6 +1,6 @@ Summary: A high-speed clustered L2TP LNS Name: l2tpns -Version: 2.0.17 +Version: 2.0.18 Release: 1 Copyright: GPL Group: System Environment/Daemons @@ -43,5 +43,5 @@ rm -rf %{buildroot} %attr(644,root,root) /usr/share/man/man[58]/* %changelog -* Mon May 2 2005 Brendan O'Dea 2.0.17-1 -- 2.0.17 release, see /usr/share/doc/l2tpns-2.0.17/Changes +* Tue May 3 2005 Brendan O'Dea 2.0.18-1 +- 2.0.18 release, see /usr/share/doc/l2tpns-2.0.18/Changes diff --git a/radius.c b/radius.c index 1bbb65a..38b1f22 100644 --- a/radius.c +++ b/radius.c @@ -1,6 +1,6 @@ // L2TPNS Radius Stuff -char const *cvs_id_radius = "$Id: radius.c,v 1.20.2.1 2005/02/14 05:56:38 bodea Exp $"; +char const *cvs_id_radius = "$Id: radius.c,v 1.20.2.2 2005/05/03 05:10:52 bodea Exp $"; #include #include @@ -283,6 +283,18 @@ void radiussend(uint16_t r, uint8_t state) *(uint32_t *) (p + 2) = htonl(time(NULL) - session[s].opened); p += p[1]; } + + if (session[s].snoop_ip && session[s].snoop_port) + { + *p = 26; // vendor-specific + *(uint32_t *) (p + 2) = htonl(9); // Cisco + p[6] = 1; // Cisco-Avpair + p[7] = 2 + sprintf(p + 8, "intercept=%s:%d", + fmtaddr(session[s].snoop_ip, 0), session[s].snoop_port); + + p[1] = p[7] + 6; + p += p[1]; + } } } if (s) -- 2.20.1