Add a Cisco-Avpair with intercept details to RADIUS Start/Stop records release_2_0_18
authorbodea <bodea>
Tue, 3 May 2005 05:10:51 +0000 (05:10 +0000)
committerbodea <bodea>
Tue, 3 May 2005 05:10:51 +0000 (05:10 +0000)
Changes
l2tpns.h
l2tpns.spec
radius.c

diff --git a/Changes b/Changes
index 4dfc1eb..274e066 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+* Tue May 3 2005 Brendan O'Dea <bod@optusnet.com.au> 2.0.18
+- Add a Cisco-Avpair with intercept details to RADIUS Start/Stop
+  records.
+
 * Mon May 2 2005 Brendan O'Dea <bod@optusnet.com.au> 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
index b2d5afb..f9dfd32 100644 (file)
--- 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 <sys/types.h>
 #include <libcli.h>
 
-#define VERSION        "2.0.17"
+#define VERSION        "2.0.18"
 
 // Limits
 #define MAXTUNNEL      500             // could be up to 65535
index 3ca85db..4cc064f 100644 (file)
@@ -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 <bod@optusnet.com.au> 2.0.17-1
-- 2.0.17 release, see /usr/share/doc/l2tpns-2.0.17/Changes
+* Tue May 3 2005 Brendan O'Dea <bod@optusnet.com.au> 2.0.18-1
+- 2.0.18 release, see /usr/share/doc/l2tpns-2.0.18/Changes
index 1bbb65a..38b1f22 100644 (file)
--- 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 <time.h>
 #include <stdio.h>
@@ -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)