diff options
author | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
---|---|---|
committer | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
commit | 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch) | |
tree | b9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/pptpd/patches |
Initial import
Diffstat (limited to 'package/pptpd/patches')
-rw-r--r-- | package/pptpd/patches/bad-pqueue-debug.patch | 20 | ||||
-rw-r--r-- | package/pptpd/patches/patch-ctrlpacket_c | 15 | ||||
-rw-r--r-- | package/pptpd/patches/pptpgre-use-debug-option.patch | 35 |
3 files changed, 70 insertions, 0 deletions
diff --git a/package/pptpd/patches/bad-pqueue-debug.patch b/package/pptpd/patches/bad-pqueue-debug.patch new file mode 100644 index 000000000..bfd185d41 --- /dev/null +++ b/package/pptpd/patches/bad-pqueue-debug.patch @@ -0,0 +1,20 @@ +diff -urN pptpd-1.3.0/pqueue.c.orig pptpd-1.3.0/pqueue.c +--- pptpd-1.3.0.orig/pqueue.c 2005-03-31 06:55:53.000000000 +0200 ++++ pptpd-1.3.0/pqueue.c 2008-10-14 13:30:20.000000000 +0200 +@@ -6,14 +6,11 @@ + #include "pqueue.h" + + #ifdef DEBUG_PQUEUE +-#define DEBUG_ON 1 ++#define DEBUG_CMD(_a) { _a } + #else +-#define DEBUG_ON 0 ++#define DEBUG_CMD(_a) + #endif + +-#define DEBUG_CMD(_a) if (DEBUG_ON) { _a } +- +- + #define MIN_CAPACITY 128 /* min allocated buffer for a packet */ + + static int pqueue_alloc (int seq, unsigned char *packet, int packlen, pqueue_t **new); diff --git a/package/pptpd/patches/patch-ctrlpacket_c b/package/pptpd/patches/patch-ctrlpacket_c new file mode 100644 index 000000000..f1a456de0 --- /dev/null +++ b/package/pptpd/patches/patch-ctrlpacket_c @@ -0,0 +1,15 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- pptpd-1.3.0.orig/ctrlpacket.c 2004-04-29 08:58:45.000000000 +0200 ++++ pptpd-1.3.0/ctrlpacket.c 2008-10-14 13:43:14.000000000 +0200 +@@ -376,9 +376,9 @@ void deal_start_ctrl_conn(unsigned char + start_ctrl_conn_rply.bearer_cap = htons(OUR_BEARER); + start_ctrl_conn_rply.max_channels = htons(MAX_CHANNELS); + start_ctrl_conn_rply.firmware_rev = htons(PPTP_FIRMWARE_VERSION); +- bzero(start_ctrl_conn_rply.hostname, MAX_HOSTNAME_SIZE); ++ memset(start_ctrl_conn_rply.hostname, 0, MAX_HOSTNAME_SIZE); + strncpy(start_ctrl_conn_rply.hostname, PPTP_HOSTNAME, MAX_HOSTNAME_SIZE); +- bzero(start_ctrl_conn_rply.vendor, MAX_VENDOR_SIZE); ++ memset(start_ctrl_conn_rply.vendor, 0, MAX_VENDOR_SIZE); + strncpy(start_ctrl_conn_rply.vendor, PPTP_VENDOR, MAX_VENDOR_SIZE); + COPY_CTRL_PACKET(start_ctrl_conn_rply, rply_packet, rply_size); + DEBUG_PACKET("START CTRL CONN RPLY"); diff --git a/package/pptpd/patches/pptpgre-use-debug-option.patch b/package/pptpd/patches/pptpgre-use-debug-option.patch new file mode 100644 index 000000000..cd1df7703 --- /dev/null +++ b/package/pptpd/patches/pptpgre-use-debug-option.patch @@ -0,0 +1,35 @@ +diff -Nur pptpd-1.3.0/pptpgre.c.orig pptpd-1.3.0/pptpgre.c +--- pptpd-1.3.0.orig/pptpgre.c 2005-08-02 13:33:31.000000000 +0200 ++++ pptpd-1.3.0/pptpgre.c 2008-10-14 13:30:20.000000000 +0200 +@@ -46,6 +46,9 @@ + + #define PACKET_MAX 8196 + ++/* Command Line Variable Args */ ++extern int pptpctrl_debug; ++ + typedef int (*callback_t)(int cl, void *pack, unsigned int len); + + /* test for a 32 bit counter overflow */ +@@ -319,7 +322,9 @@ static int dequeue_gre (callback_t callb + stats.rx_lost += head->seq - gre.seq_recv - 1; + syslog(LOG_DEBUG, "GRE: timeout waiting for %d packets", head->seq - gre.seq_recv - 1); + } +- syslog(LOG_DEBUG, "GRE: accepting #%d from queue", head->seq); ++ if (pptpctrl_debug) { ++ 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,7 +404,9 @@ int decaps_gre(int fd, int (*cb) (int cl + } + /* 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); |