diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/README | 8 | ||||
-rw-r--r-- | contrib/gentoo/net-dialup/accel-pptp/accel-pptp-0.8.1.ebuild | 112 | ||||
-rw-r--r-- | contrib/gentoo/net-dialup/accel-pptp/files/options.pptp | 32 | ||||
-rw-r--r-- | contrib/gentoo/net-dialup/accel-pptp/files/pptpd-confd | 5 | ||||
-rwxr-xr-x | contrib/gentoo/net-dialup/accel-pptp/files/pptpd-init | 21 | ||||
-rw-r--r-- | contrib/pppd-allow-mppe.patch | 101 |
6 files changed, 170 insertions, 109 deletions
diff --git a/contrib/README b/contrib/README deleted file mode 100644 index 259d8a5..0000000 --- a/contrib/README +++ /dev/null @@ -1,8 +0,0 @@ -pppd-allow-mppe.patch ---------------------- - -This patch allows pppd conditionaly This patch allows you to include mppe when -the client requires. To do this you need to replace the option require-mppe-128 -to allow-mppe-128. - - diff --git a/contrib/gentoo/net-dialup/accel-pptp/accel-pptp-0.8.1.ebuild b/contrib/gentoo/net-dialup/accel-pptp/accel-pptp-0.8.1.ebuild new file mode 100644 index 0000000..06204b0 --- /dev/null +++ b/contrib/gentoo/net-dialup/accel-pptp/accel-pptp-0.8.1.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/pptpd/pptpd-1.3.1.ebuild,v 1.1 2006/03/26 09:13:06 mrness Exp $ + +inherit linux-mod eutils autotools + +DESCRIPTION="Point-to-Point Tunnelling Protocol Client/Server for Linux" +SRC_URI="mirror://sourceforge/accel-pptp/${P}.tar.bz2" +HOMEPAGE="http://accel-pptp.sourceforge.net/" + +SLOT="0" +LICENSE="GPL" +KEYWORDS="~amd64 ~x86" +IUSE="tcpd server" + +DEPEND="server? (!net-dialup/pptpd) + >=net-dialup/ppp-2.4.2 + >=virtual/linux-sources-2.6.15 + tcpd? ( sys-apps/tcp-wrappers )" +RDEPEND="virtual/modutils" + +MODULE_NAMES="pptp(misc:${S}/kernel/driver)" +BUILD_TARGETS="default" +BUILD_PARAMS="KDIR=${KERNEL_DIR}" +CONFIG_CHECK="PPP PPPOE" +MODULESD_PPTP_ALIASES=("net-pf-24 pptp") + +src_unpack() { + unpack ${A} + + local PPPD_VER=`best_version net-dialup/ppp` + PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} + PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision + #Match pptpd-logwtmp.so's version with pppd's version (#89895) + #sed -i -e "s:\\(#define[ \\t]*VERSION[ \\t]*\\)\".*\":\\1\"${PPPD_VER}\":" "${S}/pptpd-1.3.3/plugins/patchlevel.h" + #sed -i -e "s:\\(#define[ \\t]*PPP_VERSION[ \\t]*\\)\".*\":\\1\"${PPPD_VER}\":" "${S}/pppd_plugin/src/pppd/patchlevel.h" + + convert_to_m ${S}/kernel/driver/Makefile + + cd ${S}/pppd_plugin + eautoreconf + + if use server; then + cd ${S}/pptpd-1.3.3 + eautoreconf + fi +} + +src_compile() { + + if use server; then + cd ${S}/pptpd-1.3.3 + local myconf + use tcpd && myconf="--with-libwrap" + econf --with-bcrelay \ + ${myconf} || die "configure failed" + emake COPTS="${CFLAGS}" || die "make failed" + fi + + cd ${S}/pppd_plugin + local myconf + econf ${myconf} || die "configure failed" + emake COPTS="${CFLAGS}" || die "make failed" + + cd ${S}/kernel/driver + linux-mod_src_compile || die "failed to build driver" +} + +src_install () { + if use server; then + cd ${S}/pptpd-1.3.3 + einstall || die "make install failed" + + insinto /etc + doins samples/pptpd.conf + + insinto /etc/ppp + doins samples/options.pptpd + + exeinto /etc/init.d + newexe "${FILESDIR}/pptpd-init" pptpd + + insinto /etc/conf.d + newins "${FILESDIR}/pptpd-confd" pptpd + fi + + if use client; then + cd ${S}/example + insinto /etc/ppp + doins ppp/options.pptp + insinto /etc/ppp/peers + doins ppp/peers/pptp_test + fi + + cd ${S}/pppd_plugin/src/.libs + local PPPD_VER=`best_version net-dialup/ppp` + PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} + PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision + insinto /usr/lib/pppd/${PPPD_VER} + newins pptp.so.0.0.0 pptp.so + + cd ${S}/kernel/driver + linux-mod_src_install + + cd ${S} + dodoc README + cp -R example "${D}/usr/share/doc/${P}/exmaple" +} + +pkg_postinst () { + modules-update +} diff --git a/contrib/gentoo/net-dialup/accel-pptp/files/options.pptp b/contrib/gentoo/net-dialup/accel-pptp/files/options.pptp new file mode 100644 index 0000000..d61ab80 --- /dev/null +++ b/contrib/gentoo/net-dialup/accel-pptp/files/options.pptp @@ -0,0 +1,32 @@ +# +# Lock the port +# +#lock + +# +# We don't need the tunnel server to authenticate itself +# +noauth + +# +# Turn off transmission protocols we know won't be used +# +nobsdcomp +nodeflate + +# +# We want MPPE +# +require-mppe + +# +# We want a sane mtu/mru +# +mtu 1437 +mru 1437 + +# +# Time this thing out of it goes poof +# +lcp-echo-failure 10 +lcp-echo-interval 10 diff --git a/contrib/gentoo/net-dialup/accel-pptp/files/pptpd-confd b/contrib/gentoo/net-dialup/accel-pptp/files/pptpd-confd new file mode 100644 index 0000000..1169e57 --- /dev/null +++ b/contrib/gentoo/net-dialup/accel-pptp/files/pptpd-confd @@ -0,0 +1,5 @@ +# Config file for /etc/init.d/pptpd + +# Any extra options you want to pass to pptpd +# on start-up should be put here. +PPTPD_OPTS="" diff --git a/contrib/gentoo/net-dialup/accel-pptp/files/pptpd-init b/contrib/gentoo/net-dialup/accel-pptp/files/pptpd-init new file mode 100755 index 0000000..c053720 --- /dev/null +++ b/contrib/gentoo/net-dialup/accel-pptp/files/pptpd-init @@ -0,0 +1,21 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + ebegin "Starting pptpd" + modprobe pptp + start-stop-daemon --start --quiet --exec /usr/sbin/pptpd -- ${PPTPD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping pptpd" + start-stop-daemon --stop --quiet --pidfile /var/run/pptpd.pid + result=$? + start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/pptpctrl + result=$(( $result + $? )) + eend $result +} diff --git a/contrib/pppd-allow-mppe.patch b/contrib/pppd-allow-mppe.patch deleted file mode 100644 index 618bec7..0000000 --- a/contrib/pppd-allow-mppe.patch +++ /dev/null @@ -1,101 +0,0 @@ -diff --git a/pppd/ccp.c b/pppd/ccp.c -index 5814f35..377c733 100644 ---- a/pppd/ccp.c -+++ b/pppd/ccp.c -@@ -139,6 +139,9 @@ static option_t ccp_option_list[] = { - { "require-mppe-128", o_bool, &ccp_allowoptions[0].mppe, - "require MPPE 128-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_128, - &ccp_wantoptions[0].mppe }, -+ { "allow-mppe-128", o_bool, &ccp_allowoptions[0].allow_mppe, -+ "require MPPE 128-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_128, -+ &ccp_wantoptions[0].allow_mppe }, - { "+mppe-128", o_bool, &ccp_allowoptions[0].mppe, - "require MPPE 128-bit encryption", - OPT_ALIAS | OPT_PRIO | OPT_A2OR | MPPE_OPT_128, -@@ -397,7 +400,7 @@ ccp_open(unit) - * deciding whether to open in silent mode. - */ - ccp_resetci(f); -- if (!ANY_COMPRESS(ccp_gotoptions[unit])) -+ if (!ANY_COMPRESS(ccp_gotoptions[unit]) || ccp_gotoptions[unit].allow_mppe) - f->flags |= OPT_SILENT; - - fsm_open(f); -@@ -1077,6 +1080,8 @@ ccp_reqci(f, p, lenp, dont_nak) - int len, clen, type, nb; - ccp_options *ho = &ccp_hisoptions[f->unit]; - ccp_options *ao = &ccp_allowoptions[f->unit]; -+ ccp_options *go = &ccp_gotoptions[f->unit]; -+ ccp_options *wo = &ccp_wantoptions[f->unit]; - #ifdef MPPE - bool rej_for_ci_mppe = 1; /* Are we rejecting based on a bad/missing */ - /* CI_MPPE, or due to other options? */ -@@ -1103,11 +1108,22 @@ ccp_reqci(f, p, lenp, dont_nak) - switch (type) { - #ifdef MPPE - case CI_MPPE: -- if (!ao->mppe || clen != CILEN_MPPE) { -+ if (!(ao->mppe||ao->allow_mppe) || clen != CILEN_MPPE) { - newret = CONFREJ; - break; - } -+ - MPPE_CI_TO_OPTS(&p[2], ho->mppe); -+ -+ if (ao->allow_mppe && !ao->mppe && (ho->mppe&MPPE_OPT_128)){ -+ ao->mppe=ao->allow_mppe; -+ go->mppe=go->allow_mppe; -+ wo->mppe=wo->allow_mppe; -+ ccp_resetci(f); -+ /*ccp_down(f); -+ ccp_up(f); -+ return CONFACK;*/ -+ } - - /* Nak if anything unsupported or unknown are set. */ - if (ho->mppe & MPPE_OPT_UNSUPPORTED) { -diff --git a/pppd/ccp.h b/pppd/ccp.h -index 6f4a2fe..7211c74 100644 ---- a/pppd/ccp.h -+++ b/pppd/ccp.h -@@ -38,6 +38,7 @@ typedef struct ccp_options { - bool deflate_correct; /* use correct code for deflate? */ - bool deflate_draft; /* use draft RFC code for deflate? */ - bool mppe; /* do MPPE? */ -+ bool allow_mppe; /* do MPPE? */ - u_short bsd_bits; /* # bits/code for BSD Compress */ - u_short deflate_size; /* lg(window size) for Deflate */ - short method; /* code for chosen compression method */ -diff --git a/pppd/fsm.c b/pppd/fsm.c -index c200cc3..782dd0e 100644 ---- a/pppd/fsm.c -+++ b/pppd/fsm.c -@@ -435,11 +435,11 @@ fsm_rconfreq(f, id, inp, len) - f->state = REQSENT; - break; - -- case STOPPED: -- /* Negotiation started by our peer */ -- fsm_sconfreq(f, 0); /* Send initial Configure-Request */ -- f->state = REQSENT; -- break; -+// case STOPPED: -+// /* Negotiation started by our peer */ -+// fsm_sconfreq(f, 0); /* Send initial Configure-Request */ -+// f->state = REQSENT; -+// break; - } - - /* -@@ -454,6 +454,11 @@ fsm_rconfreq(f, id, inp, len) - else - code = CONFACK; - -+ if (f->state==STOPPED){ -+ fsm_sconfreq(f, 0); /* Send initial Configure-Request */ -+ f->state = REQSENT; -+ } -+ - /* send the Ack, Nak or Rej to the peer */ - fsm_sdata(f, code, id, inp, len); - |