From 5151ca40547c87612360f4115a9e17837f64d2b6 Mon Sep 17 00:00:00 2001 From: Brendan O'Dea Date: Wed, 14 Dec 2005 02:19:15 +0000 Subject: [PATCH] drop backtrace --- Changes | 3 +++ l2tpns.c | 6 +----- l2tpns.h | 21 +++------------------ l2tpns.spec | 6 +++--- ppp.c | 6 +----- 5 files changed, 11 insertions(+), 31 deletions(-) diff --git a/Changes b/Changes index 961aabf..3f94f2f 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +* Wed Dec 14 2005 Brendan O'Dea 2.1.15 +- Drop backtrace. + * Fri Dec 9 2005 Brendan O'Dea 2.1.14 - Run PLUGIN_RADIUS_ACCOUNT for Start records. diff --git a/l2tpns.c b/l2tpns.c index 534601e..3c90f6a 100644 --- 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 -char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.151 2005-12-07 05:21:37 bodea Exp $"; +char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.152 2005-12-14 02:19:15 bodea Exp $"; #include #include @@ -940,18 +940,14 @@ void tunnelsend(uint8_t * buf, uint16_t l, tunnelidt t) if (!t) { - static int backtrace_count = 0; LOG(0, 0, t, "tunnelsend called with 0 as tunnel id\n"); STAT(tunnel_tx_errors); - log_backtrace(backtrace_count, 5) return; } if (!tunnel[t].ip) { - static int backtrace_count = 0; LOG(1, 0, t, "Error sending data out tunnel: no remote endpoint (tunnel not set up)\n"); - log_backtrace(backtrace_count, 5) STAT(tunnel_tx_errors); return; } diff --git a/l2tpns.h b/l2tpns.h index f27939c..c7af44b 100644 --- a/l2tpns.h +++ b/l2tpns.h @@ -1,11 +1,10 @@ // L2TPNS Global Stuff -// $Id: l2tpns.h,v 1.106 2005-12-09 00:43:17 bodea Exp $ +// $Id: l2tpns.h,v 1.107 2005-12-14 02:19:15 bodea Exp $ #ifndef __L2TPNS_H__ #define __L2TPNS_H__ #include -#include #include #include #include @@ -15,7 +14,7 @@ #include #include -#define VERSION "2.1.14" +#define VERSION "2.1.15" // Limits #define MAXTUNNEL 500 // could be up to 65535 @@ -741,6 +740,7 @@ int cmd_show_hist_open(struct cli_def *cli, char *command, char **argv, int argc void _log(int level, sessionidt s, tunnelidt t, const char *format, ...) __attribute__((format (printf, 4, 5))); void _log_hex(int level, const char *title, const uint8_t *data, int maxsize); + int sessionsetup(sessionidt s, tunnelidt t); int run_plugins(int plugin_type, void *data); void rebuild_address_pool(void); @@ -766,21 +766,6 @@ extern sessionlocalt *sess_local; extern ippoolt *ip_address_pool; #define sessionfree (session[0].next) -#define log_backtrace(count, max) \ -if (count++ < max) { \ - void *array[20]; \ - char **strings; \ - int size, i; \ - LOG(0, 0, t, "Backtrace follows:\n"); \ - size = backtrace(array, 10); \ - strings = backtrace_symbols(array, size); \ - if (strings) for (i = 0; i < size; i++) \ - { \ - LOG(0, 0, t, " %s\n", strings[i]); \ - } \ - free(strings); \ -} - extern configt *config; extern time_t basetime; // Time when this process started. diff --git a/l2tpns.spec b/l2tpns.spec index 48548f1..cb380c1 100644 --- a/l2tpns.spec +++ b/l2tpns.spec @@ -1,6 +1,6 @@ Summary: A high-speed clustered L2TP LNS Name: l2tpns -Version: 2.1.14 +Version: 2.1.15 Release: 1 License: GPL Group: System Environment/Daemons @@ -43,5 +43,5 @@ rm -rf %{buildroot} %attr(644,root,root) /usr/share/man/man[58]/* %changelog -* Fri Dec 9 2005 Brendan O'Dea 2.1.14-1 -- 2.1.14 release, see /usr/share/doc/l2tpns-2.1.14/Changes +* Wed Dec 14 2005 Brendan O'Dea 2.1.15-1 +- 2.1.15 release, see /usr/share/doc/l2tpns-2.1.15/Changes diff --git a/ppp.c b/ppp.c index 70f6cdd..9c98a3c 100644 --- a/ppp.c +++ b/ppp.c @@ -1,6 +1,6 @@ // L2TPNS PPP Stuff -char const *cvs_id_ppp = "$Id: ppp.c,v 1.88 2005-12-07 05:21:37 bodea Exp $"; +char const *cvs_id_ppp = "$Id: ppp.c,v 1.89 2005-12-14 02:19:15 bodea Exp $"; #include #include @@ -1755,9 +1755,7 @@ uint8_t *makeppp(uint8_t *b, int size, uint8_t *p, int l, sessionidt s, tunnelid { if (size < 12) // Need more space than this!! { - static int backtrace_count = 0; LOG(0, s, t, "makeppp buffer too small for L2TP header (size=%d)\n", size); - log_backtrace(backtrace_count, 5) return NULL; } @@ -1780,9 +1778,7 @@ uint8_t *makeppp(uint8_t *b, int size, uint8_t *p, int l, sessionidt s, tunnelid if (l + 12 > size) { - static int backtrace_count = 0; LOG(2, s, t, "makeppp would overflow buffer (size=%d, header+payload=%d)\n", size, l + 12); - log_backtrace(backtrace_count, 5) return NULL; } -- 2.20.1