summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-10-06 16:55:05 +0400
committerKozlov Dmitry <dima@server>2010-10-06 16:55:05 +0400
commit45b3c9c5bdd896f51f47e29069e3c030ddb17d51 (patch)
treecbec5824ffb2eee20b98ad9892a357304384ff01 /contrib
parentba3db9f17477ea4b49c266c5cb50f63f3b074db2 (diff)
parent01ccd98495c9da1e79f7867bf52416b23f20200d (diff)
downloadaccel-ppp-45b3c9c5bdd896f51f47e29069e3c030ddb17d51.tar.gz
accel-ppp-45b3c9c5bdd896f51f47e29069e3c030ddb17d51.zip
merged branch accel-pptpd
Diffstat (limited to 'contrib')
-rw-r--r--contrib/README8
-rw-r--r--contrib/gentoo/net-dialup/accel-pptp/files/options.pptp32
-rw-r--r--contrib/gentoo/net-dialup/accel-pptp/files/pptpd-confd5
-rwxr-xr-xcontrib/gentoo/net-dialup/accel-pptp/files/pptpd-init21
-rw-r--r--contrib/pppd-allow-mppe.patch101
5 files changed, 58 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/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);
-