From 4837f08f3956585d1aaa1e47ae2be3cab8813415 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 30 Apr 2006 12:58:47 +0000 Subject: [PATCH] Update pptpd to 1.3.0, closes #496 for whiterussian Fix /var/lock creation for ppp, closes #520 SVN-Revision: 3714 --- openwrt/package/ppp/Makefile | 2 +- openwrt/package/pptpd/Makefile | 4 +-- openwrt/package/pptpd/files/pptpd.init | 2 +- .../pptpd/patches/bad-pqueue-debug.patch | 20 +++++++++++ .../patches/pptpgre-use-debug-option.patch | 35 +++++++++++++++++++ 5 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 openwrt/package/pptpd/patches/bad-pqueue-debug.patch create mode 100644 openwrt/package/pptpd/patches/pptpgre-use-debug-option.patch diff --git a/openwrt/package/ppp/Makefile b/openwrt/package/ppp/Makefile index 3e88236a0d..f140e2195e 100644 --- a/openwrt/package/ppp/Makefile +++ b/openwrt/package/ppp/Makefile @@ -97,7 +97,7 @@ $(IPKG_PPP): install -d -m0755 $(IDIR_PPP)/usr/sbin install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(IDIR_PPP)/usr/sbin/ install -d -m0755 $(IDIR_PPP)/usr/lib/pppd - install -d -m0755 $(IDIR_PPP)/var/lock + install -d -m0755 $(IDIR_PPP)/tmp/lock echo "Depends: $(PKG_DEPEND)" >> $(IDIR_PPP)/CONTROL/control $(RSTRIP) $(IDIR_PPP) $(IPKG_BUILD) $(IDIR_PPP) $(PACKAGE_DIR) diff --git a/openwrt/package/pptpd/Makefile b/openwrt/package/pptpd/Makefile index 0adcfe2639..cde7ee59a2 100644 --- a/openwrt/package/pptpd/Makefile +++ b/openwrt/package/pptpd/Makefile @@ -3,9 +3,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pptpd -PKG_VERSION:=1.2.3 +PKG_VERSION:=1.3.0 PKG_RELEASE:=2 -PKG_MD5SUM:=a521e40ca304b0c125cc25f9b9d03324 +PKG_MD5SUM:=75d494e881f7027f4e60b114163f6b67 PKG_SOURCE_URL:=@SF/poptop PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/openwrt/package/pptpd/files/pptpd.init b/openwrt/package/pptpd/files/pptpd.init index a76f739fd4..d4944c7677 100644 --- a/openwrt/package/pptpd/files/pptpd.init +++ b/openwrt/package/pptpd/files/pptpd.init @@ -9,7 +9,7 @@ PID_F=$RUN_D/$BIN.pid case $1 in start) mkdir -p $RUN_D - for m in arc4 sha1 slhc ppp_generic ppp_async ppp_mppe_mppc; do + for m in arc4 sha1 slhc crc-ccitt ppp_generic ppp_async ppp_mppe_mppc; do insmod $m >/dev/null 2>&1 done $BIN $OPTIONS diff --git a/openwrt/package/pptpd/patches/bad-pqueue-debug.patch b/openwrt/package/pptpd/patches/bad-pqueue-debug.patch new file mode 100644 index 0000000000..87e76648a1 --- /dev/null +++ b/openwrt/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/pqueue.c.orig 2006-04-17 20:44:28.000000000 -0400 ++++ pptpd-1.3.0/pqueue.c 2006-04-17 20:44:58.000000000 -0400 +@@ -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/openwrt/package/pptpd/patches/pptpgre-use-debug-option.patch b/openwrt/package/pptpd/patches/pptpgre-use-debug-option.patch new file mode 100644 index 0000000000..d4ffe5c2e9 --- /dev/null +++ b/openwrt/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/pptpgre.c.orig 2006-04-18 02:13:10.000000000 -0400 ++++ pptpd-1.3.0/pptpgre.c 2006-04-18 02:14:19.000000000 -0400 +@@ -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 @@ + 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 @@ + } + /* 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); -- 2.30.2