Package: pptpd
Version: 1.3.0-1
Could you please consider patching the current PoPToP package (pptpd)
for Debian testing/unstable, version 1.3.0-1 using the attached patch?
It is a backport patch from the current experimental version 1.3.2
(see: http://www.poptop.org/) which disables the DEBUG logging to the
syslog when the debug option has not been turned on in the
/etc/pptpd.conf file.
The current version makes my syslog grow really fast because it logs
many messages like this: "GRE: accepting packet 1234".
--- pptpd-1.3.0/pptpgre.c 2005-08-02 13:33:31.000000000 +0200
+++ pptpd-1.3.0-patched/pptpgre.c 2006-06-26 14:06:12.000000000 +0200
@@ -37,6 +37,7 @@
#include "ppphdlc.h"
#include "pptpgre.h"
#include "pptpdefs.h"
+#include "pptpctrl.h"
#include "defaults.h"
#include "pqueue.h"
@@ -317,9 +318,13 @@
/* if it is timed out... */
if (head->seq != gre.seq_recv + 1 ) { /* wrap-around safe */
stats.rx_lost += head->seq - gre.seq_recv - 1;
- syslog(LOG_DEBUG, "GRE: timeout waiting for %d
packets", head->seq - gre.seq_recv - 1);
+ if (pptpctrl_debug) {
+ syslog(LOG_DEBUG, "GRE: timeout waiting for %d
packets", head->seq - gre.seq_recv - 1);
+ }
+ }
+ if (pptpctrl_debug) {
+ syslog(LOG_DEBUG, "GRE: accepting #%d from queue",
head->seq);
}
- syslog(LOG_DEBUG, "GRE: accepting #%d from queue", head->seq);
gre.seq_recv = head->seq;
status = callback(cl, head->packet, head->packlen);
pqueue_del(head);
@@ -399,16 +404,22 @@
}
/* check for out-of-order sequence number */
if (seq_greater(seq, gre.seq_recv)) {
- syslog(LOG_DEBUG, "GRE: accepting packet #%d", seq);
+ if (pptpctrl_debug) {
+ syslog(LOG_DEBUG, "GRE: accepting packet #%d",
seq);
+ }
stats.rx_accepted++;
gre.seq_recv = seq;
return cb(cl, buffer + ip_len + headersize,
payload_len);
} else if (seq == gre.seq_recv) {
- syslog(LOG_DEBUG, "GRE: discarding duplicate or old
packet #%d (expecting #%d)", seq, gre.seq_recv + 1);
+ if (pptpctrl_debug) {
+ syslog(LOG_DEBUG, "GRE: discarding duplicate or
old packet #%d (expecting #%d)", seq, gre.seq_recv + 1);
+ }
return 0; /* discard duplicate packets */
} else {
stats.rx_buffered++;
- syslog(LOG_DEBUG, "GRE: buffering packet #%d (expecting
#%d, lost or reordered)", seq, gre.seq_recv + 1);
+ if (pptpctrl_debug) {
+ syslog(LOG_DEBUG, "GRE: buffering packet #%d
(expecting #%d, lost or reordered)", seq, gre.seq_recv + 1);
+ }
pqueue_add(seq, buffer + ip_len + headersize,
payload_len);
return 0; /* discard out-of-order packets */
}