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 |
Initial import
Diffstat (limited to 'package/pptpd')
-rw-r--r-- | package/pptpd/Config.in | 11 | ||||
-rw-r--r-- | package/pptpd/Makefile | 36 | ||||
-rw-r--r-- | package/pptpd/files/options.pptpd | 23 | ||||
-rw-r--r-- | package/pptpd/files/pptpd.conf | 5 | ||||
-rw-r--r-- | package/pptpd/files/pptpd.init | 28 | ||||
-rw-r--r-- | package/pptpd/ipkg/pptpd.conffiles | 2 | ||||
-rw-r--r-- | package/pptpd/ipkg/pptpd.control | 5 | ||||
-rw-r--r-- | package/pptpd/ipkg/pptpd.postinst | 3 | ||||
-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 |
11 files changed, 183 insertions, 0 deletions
diff --git a/package/pptpd/Config.in b/package/pptpd/Config.in new file mode 100644 index 000000000..7f1144f1b --- /dev/null +++ b/package/pptpd/Config.in @@ -0,0 +1,11 @@ +config ADK_PACKAGE_PPTPD + prompt "pptpd............................. PPTP (Point-to-Point Tunneling Protocol) server" + tristate + default n + select ADK_KPACKAGE_KMOD_NET_IPGRE + select ADK_PACKAGE_PPP + help + A Point-to-Point Tunneling Protocol server + + http://poptop.sourceforge.net/ + diff --git a/package/pptpd/Makefile b/package/pptpd/Makefile new file mode 100644 index 000000000..bc6a6e628 --- /dev/null +++ b/package/pptpd/Makefile @@ -0,0 +1,36 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= pptpd +PKG_VERSION:= 1.3.0 +PKG_RELEASE:= 9 +PKG_MD5SUM:= 75d494e881f7027f4e60b114163f6b67 +MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=poptop/} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,PPTPD,pptpd,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE:= gnu +BUILD_STYLE:= auto +INSTALL_STYLE:= auto +TCFLAGS+= -DSBINDIR=\\\"/usr/sbin\\\" +FAKE_FLAGS+= INSTALL="install" + +post-install: + ${INSTALL_DIR} ${IDIR_PPTPD}/etc + ${INSTALL_DIR} ${IDIR_PPTPD}/etc/init.d + ${INSTALL_DIR} ${IDIR_PPTPD}/etc/ppp + ${INSTALL_DIR} ${IDIR_PPTPD}/usr/sbin + ${INSTALL_DATA} ./files/pptpd.conf ${IDIR_PPTPD}/etc/ + ${INSTALL_BIN} ./files/pptpd.init \ + ${IDIR_PPTPD}/etc/init.d/pptpd + ${INSTALL_DATA} ./files/options.pptpd ${IDIR_PPTPD}/etc/ppp/ + ${INSTALL_BIN} ${WRKINST}/usr/sbin/pptpd \ + ${WRKINST}/usr/sbin/pptpctrl ${IDIR_PPTPD}/usr/sbin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/pptpd/files/options.pptpd b/package/pptpd/files/options.pptpd new file mode 100644 index 000000000..5dd2daf79 --- /dev/null +++ b/package/pptpd/files/options.pptpd @@ -0,0 +1,23 @@ +#debug +#logfile /tmp/pptp-server.log +172.16.1.1: +auth +name "pptp-server" +lcp-echo-failure 3 +lcp-echo-interval 60 +default-asyncmap +mtu 1482 +mru 1482 +nobsdcomp +nodeflate +#noproxyarp +#nomppc +mppe required,no40,no56,stateless +require-mschap-v2 +refuse-chap +refuse-mschap +refuse-eap +refuse-pap +#ms-dns 172.16.1.1 +#plugin radius.so +#radius-config-file /etc/radius.conf diff --git a/package/pptpd/files/pptpd.conf b/package/pptpd/files/pptpd.conf new file mode 100644 index 000000000..354745f59 --- /dev/null +++ b/package/pptpd/files/pptpd.conf @@ -0,0 +1,5 @@ +#debug +option /etc/ppp/options.pptpd +speed 115200 +stimeout 10 +#localip & remoteip are not needed, ip management is done by pppd diff --git a/package/pptpd/files/pptpd.init b/package/pptpd/files/pptpd.init new file mode 100644 index 000000000..c2b8ac032 --- /dev/null +++ b/package/pptpd/files/pptpd.init @@ -0,0 +1,28 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${pptpd:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + for m in arc4 sha1 slhc crc-ccitt ppp_generic ppp_async ppp_mppe_mppc; do + insmod $m >/dev/null 2>&1 + done + pptpd + ;; +stop) + killall pptpd + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "usage: $0 {start | stop | restart}" + exit 1 +esac +exit $? diff --git a/package/pptpd/ipkg/pptpd.conffiles b/package/pptpd/ipkg/pptpd.conffiles new file mode 100644 index 000000000..c5afda91f --- /dev/null +++ b/package/pptpd/ipkg/pptpd.conffiles @@ -0,0 +1,2 @@ +/etc/ppp/options.pptpd +/etc/pptpd.conf diff --git a/package/pptpd/ipkg/pptpd.control b/package/pptpd/ipkg/pptpd.control new file mode 100644 index 000000000..135fa944c --- /dev/null +++ b/package/pptpd/ipkg/pptpd.control @@ -0,0 +1,5 @@ +Package: pptpd +Priority: optional +Section: net +Description: a Point-to-Point Tunneling Protocol (PPTP) server +Depends: ppp, kmod-crypto, kmod-mppe, kmod-ppp diff --git a/package/pptpd/ipkg/pptpd.postinst b/package/pptpd/ipkg/pptpd.postinst new file mode 100644 index 000000000..05b1af001 --- /dev/null +++ b/package/pptpd/ipkg/pptpd.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf pptpd pptpd NO 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); |