[packages/ppp] - updated to 2.5.0, now uses autotools
qboosh
qboosh at pld-linux.org
Wed Sep 6 19:21:41 CEST 2023
commit 624b49b7cdb20758ded2f4fc2e15e1142d961477
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Sep 6 18:55:03 2023 +0200
- updated to 2.5.0, now uses autotools
ppp-2.4.3-mppe-mppc-1.1.patch | 348 ++++++++++++++++-------------------
ppp-ifpppstatsreq.patch | 140 --------------
ppp-lib64.patch | 73 --------
ppp-libx32.patch | 74 --------
ppp-make.patch | 24 ---
ppp-openssl.patch | 26 ---
ppp.spec | 84 ++++-----
pppd-2.4.2-chapms-strip-domain.patch | 39 ++--
8 files changed, 220 insertions(+), 588 deletions(-)
---
diff --git a/ppp.spec b/ppp.spec
index 32d85e6..38bfba5 100644
--- a/ppp.spec
+++ b/ppp.spec
@@ -6,6 +6,7 @@
%bcond_without mppc # MPPC support
%bcond_without pppoatm # PPPoATM plugin (requires kernel 2.4+ and atm-devel)
%bcond_with srp # SRP support
+%bcond_without systemd # systemd notifications
#
Summary: ppp daemon package for Linux
Summary(de.UTF-8): ppp-Dämonpaket für Linux
@@ -17,38 +18,37 @@ Summary(ru.UTF-8): Демон ppp
Summary(tr.UTF-8): PPP sunucu süreci
Summary(zh_CN.UTF-8): PPP 配置和管理软件包
Name: ppp
-Version: 2.4.9
-Release: 4
+Version: 2.5.0
+Release: 1
Epoch: 3
License: distributable
Group: Networking/Daemons
Source0: https://download.samba.org/pub/ppp/%{name}-%{version}.tar.gz
-# Source0-md5: c88153ae3d16ae114152cd3c15c7301d
+# Source0-md5: ce5fd7b9f6e1095ae6c0c11365c444eb
Source1: %{name}.pamd
Source2: %{name}.pon
Source3: %{name}.poff
Source4: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
# Source4-md5: 3801b59005bef8f52856300fe3167a64
Source5: %{name}.logrotate
-Patch0: %{name}-make.patch
Patch2: %{name}-debian_scripts.patch
Patch4: %{name}-pidfile-owner.patch
-#Patch7: http://public.planetmirror.com/pub/mppe/pppd-2.4.2-chapms-strip-domain.patch.gz
+# http://public.planetmirror.com/pub/mppe/pppd-2.4.2-chapms-strip-domain.patch.gz
Patch7: pppd-2.4.2-chapms-strip-domain.patch
-Patch8: %{name}-openssl.patch
-Patch9: %{name}-lib64.patch
-#Patch10: http://mppe-mppc.alphacron.de/%{name}-2.4.3-mppe-mppc-1.1.patch.gz
+# http://mppe-mppc.alphacron.de/%{name}-2.4.3-mppe-mppc-1.1.patch.gz
Patch10: %{name}-2.4.3-mppe-mppc-1.1.patch
-Patch11: %{name}-ifpppstatsreq.patch
-Patch12: %{name}-libx32.patch
URL: https://ppp.samba.org/
+BuildRequires: autoconf >= 2.69
+BuildRequires: automake
BuildRequires: libpcap-devel >= 2:0.8.1
+BuildRequires: libtool >= 2:2
%{?with_pppoatm:BuildRequires: linux-atm-devel}
# <linux/if_pppol2tp.h>
BuildRequires: linux-libc-headers >= 7:2.6.23
BuildRequires: openssl-devel
BuildRequires: pam-devel
%{?with_srp:BuildRequires: srp-devel}
+%{?with_systemd:BuildRequires: systemd-devel >= 1:209}
Requires: pam >= 0.77.3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -115,36 +115,36 @@ Wtyczka PPPoATM dla pppd.
%prep
%setup -q
-%patch0 -p1
%patch2 -p1
%patch4 -p1
%patch7 -p1
-%patch8 -p1
-%if "%{_lib}" == "lib64"
-%patch9 -p1
-%endif
%if %{with mppc}
%patch10 -p1
%endif
-%patch11 -p1
-%if "%{_lib}" == "libx32"
-%patch12 -p1
-%endif
# use headers from llh instead of older supplied by ppp, incompatible with current llh
%{__rm} include/linux/*.h
+%{__sed} -i -e 's,/usr/lib64/openssl/engines/,/%{_lib}/engines-3/,' \
+ -e 's,/usr/lib64/,%{_libdir}/,' etc.ppp/openssl.cnf
+
%build
-# note: not autoconf configure
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
%configure \
- --cc="%{__cc}" \
- --cflags="%{rpmcflags} %{rpmcppflags}"
+ --enable-cbcp \
+ --enable-mslanman \
+ --enable-multilink \
+ --disable-silent-rules \
+ %{?with_systemd:--enable-systemd} \
+ %{!?with_pppoatm:--without-atm} \
+ --with-plugin-dir=%{_libdir}/pppd/plugins \
+ %{!?with_srp:--without-srp}
-%{__make} \
- %{?with_pppoatm:HAVE_LIBATM=y} \
- USE_PAM=y \
- %{?with_srp:USE_SRP=y} \
- LDFLAGS="%{rpmldflags}"
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
@@ -152,9 +152,9 @@ install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/ppp/peers,/var/log} \
$RPM_BUILD_ROOT/etc/{pam.d,logrotate.d}
%{__make} install \
- %{?with_pppoatm:HAVE_LIBATM=y} \
- %{?with_srp:USE_SRP=y} \
- DESTDIR=$RPM_BUILD_ROOT%{_prefix}
+ DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/pppd/plugins/*.la
install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/pon
install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/poff
@@ -171,15 +171,11 @@ bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/ppp
> $RPM_BUILD_ROOT/var/log/ppp.log
-%{__rm} scripts/README
-
cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/ppp
-cd $RPM_BUILD_ROOT%{_libdir}/pppd
-v=$(echo %{version}*)
-%{__mv} $v plugins
-# not sure which path used, keep the old path for compat
-ln -s plugins $v
+[ ! -d example-scripts ] || %{__rm} -r example-scripts # make install reentrant
+cp -pr scripts example-scripts
+%{__rm} example-scripts/Makefile*
%clean
rm -rf $RPM_BUILD_ROOT
@@ -195,9 +191,7 @@ fi
%files
%defattr(644,root,root,755)
-%doc README.linux debian/README.debian scripts
-%doc debian/win95.ppp README.MSCHAP8* FAQ debian/ppp-2.3.0.STATIC.README
-%doc README.MPPE README.pppoe README.cbcp README.pwfd
+%doc Changes-2.3 FAQ NEWS README README.{MPPE,MSCHAP80,MSCHAP81,cbcp,eap-tls,linux,pppoe,pppol2tp,pwfd} %{?with_srp:README.eap-srp} SETUP debian/{README.debian,win95.ppp} example-scripts
%attr(755,root,root) %{_bindir}/plog
%attr(755,root,root) %{_bindir}/poff
%attr(755,root,root) %{_bindir}/pon
@@ -218,17 +212,14 @@ fi
%attr(755,root,root) %{_libdir}/pppd/plugins/radattr.so
%attr(755,root,root) %{_libdir}/pppd/plugins/radius.so
%attr(755,root,root) %{_libdir}/pppd/plugins/radrealms.so
-%attr(755,root,root) %{_libdir}/pppd/plugins/rp-pppoe.so
%attr(755,root,root) %{_libdir}/pppd/plugins/winbind.so
-# TODO: legacy, try to drop
-%{_libdir}/pppd/%{version}
-
%{_mandir}/man8/chat.8*
%{_mandir}/man8/pppd.8*
%{_mandir}/man8/pppd-radattr.8*
%{_mandir}/man8/pppd-radius.8*
%{_mandir}/man8/pppdump.8*
+%{_mandir}/man8/pppoe-discovery.8*
%{_mandir}/man8/pppstats.8*
%lang(fr) %{_mandir}/fr/man8/*
%lang(ja) %{_mandir}/ja/man8/*
@@ -237,6 +228,9 @@ fi
%attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/chap-secrets
%attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/pap-secrets
+%attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/eaptls-client
+%attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/eaptls-server
+%attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/openssl.cnf
%config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/options
%config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/options.ttyXX
%dir %{_sysconfdir}/ppp/peers
@@ -246,7 +240,9 @@ fi
%files plugin-devel
%defattr(644,root,root,755)
+%doc PLUGINS
%{_includedir}/pppd
+%{_pkgconfigdir}/pppd.pc
%if %{with pppoatm}
%files plugin-pppoatm
diff --git a/ppp-2.4.3-mppe-mppc-1.1.patch b/ppp-2.4.3-mppe-mppc-1.1.patch
index 0c0ab7f..c85860d 100644
--- a/ppp-2.4.3-mppe-mppc-1.1.patch
+++ b/ppp-2.4.3-mppe-mppc-1.1.patch
@@ -99,25 +99,31 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
/*
* Definitions for other, as yet unsupported, compression methods.
*/
---- ppp-2.4.9/pppd/ccp.c.orig 2021-01-05 00:06:37.000000000 +0100
-+++ ppp-2.4.9/pppd/ccp.c 2021-01-09 19:01:16.225743180 +0100
-@@ -61,12 +61,10 @@ static int setdeflate (char **);
- static char bsd_value[8];
- static char deflate_value[8];
+--- ppp-2.5.0/pppd/ccp.c.orig 2022-12-30 02:12:39.000000000 +0100
++++ ppp-2.5.0/pppd/ccp.c 2023-09-03 14:16:15.333281107 +0200
+@@ -36,11 +36,7 @@
--/*
-- * Option variables.
-- */
- #ifdef MPPE
--bool refuse_mppe_stateful = 1; /* Allow stateful mode? */
+ #include <stdlib.h>
+ #include <string.h>
+-#if defined(SOL2)
+ #include <net/ppp-comp.h>
+-#else
+-#include <linux/ppp-comp.h>
-#endif
+
+ #include "pppd-private.h"
+ #include "options.h"
+@@ -73,7 +73,8 @@ static char deflate_value[8];
+ * Option variables.
+ */
+ #ifdef PPP_WITH_MPPE
+-bool refuse_mppe_stateful = 1; /* Allow stateful mode? */
+static int setmppe(char **);
+static int setnomppe(void);
-+#endif /* MPPE */
+ #endif
- static option_t ccp_option_list[] = {
- { "noccp", o_bool, &ccp_protent.enabled_flag,
-@@ -107,54 +105,36 @@ static option_t ccp_option_list[] = {
+ static struct option ccp_option_list[] = {
+@@ -115,54 +116,36 @@ static struct option ccp_option_list[] =
"don't allow Predictor-1", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR,
&ccp_allowoptions[0].predictor_1 },
@@ -132,7 +138,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ "don't allow Stac LZS", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR,
+ &ccp_allowoptions[0].lzs },
+
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
- /* MPPE options are symmetrical ... we only set wantoptions here */
- { "require-mppe", o_bool, &ccp_wantoptions[0].mppe,
- "require MPPE encryption",
@@ -201,7 +207,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
#endif /* MPPE */
{ NULL }
-@@ -240,7 +220,7 @@ static fsm_callbacks ccp_callbacks = {
+@@ -248,7 +231,7 @@ static fsm_callbacks ccp_callbacks = {
*/
#define ANY_COMPRESS(opt) ((opt).deflate || (opt).bsd_compress \
|| (opt).predictor_1 || (opt).predictor_2 \
@@ -210,11 +216,11 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
/*
* Local state (mainly for handling reset-reqs and reset-acks).
-@@ -341,6 +321,100 @@ setdeflate(char **argv)
+@@ -349,6 +332,100 @@ setdeflate(char **argv)
return 1;
}
-+#ifdef MPPE
++#ifdef PPP_WITH_MPPE
+/*
+ * Functions called from config options
+ */
@@ -262,7 +268,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ ccp_wantoptions[0].mppe = 1;
+ goto next_param;
+ } else {
-+ option_error("invalid parameter '%s' for mppe option", cmdbuf);
++ ppp_option_error("invalid parameter '%s' for mppe option", cmdbuf);
+ return 0;
+ }
+
@@ -275,7 +281,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ if (!(ccp_allowoptions[0].mppe_40 || ccp_allowoptions[0].mppe_56 ||
+ ccp_allowoptions[0].mppe_128)) {
+ if (ccp_wantoptions[0].mppe == 1) {
-+ option_error("You require MPPE but you have switched off "
++ ppp_option_error("You require MPPE but you have switched off "
+ "all encryption key lengths.");
+ return 0;
+ }
@@ -306,12 +312,12 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ ccp_wantoptions[0].mppe_stateless = ccp_allowoptions[0].mppe_stateless = 0;
+ return 1;
+}
-+#endif /* MPPE */
++#endif /* PPP_WITH_MPPE */
+
/*
* ccp_init - initialize CCP.
*/
-@@ -374,6 +448,30 @@ ccp_init(int unit)
+@@ -382,6 +459,30 @@ ccp_init(int unit)
ccp_allowoptions[0].bsd_bits = BSD_MAX_BITS;
ccp_allowoptions[0].predictor_1 = 1;
@@ -323,7 +329,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ ccp_allowoptions[0].lzs_mode = LZS_MODE_SEQ;
+ ccp_allowoptions[0].lzs_hists = 1;
+
-+#ifdef MPPE
++#ifdef PPP_WITH_MPPE
+ /* by default allow and request MPPC... */
+ ccp_wantoptions[0].mppc = ccp_allowoptions[0].mppc = 1;
+
@@ -338,25 +344,20 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ ccp_wantoptions[0].mppe_56 = 0;
+ ccp_wantoptions[0].mppe_128 = 0;
+ ccp_wantoptions[0].mppe_stateless = 0;
-+#endif /* MPPE */
++#endif /* PPP_WITH_MPPE */
}
/*
-@@ -443,11 +541,11 @@ ccp_input(int unit, u_char *p, int len)
+@@ -451,7 +552,7 @@ ccp_input(int unit, u_char *p, int len)
if (oldstate == OPENED && p[0] == TERMREQ && f->state != OPENED) {
notice("Compression disabled by peer.");
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
- if (ccp_gotoptions[unit].mppe) {
+ if (ccp_wantoptions[unit].mppe) {
error("MPPE disabled, closing LCP");
lcp_close(unit, "MPPE disabled by peer");
}
--#endif
-+#endif /* MPPE */
- }
-
- /*
-@@ -471,6 +569,15 @@ ccp_extcode(fsm *f, int code, int id, u_
+@@ -479,6 +580,15 @@ ccp_extcode(fsm *f, int code, int id, u_
break;
/* send a reset-ack, which the transmitter will see and
reset its compression state. */
@@ -372,31 +373,25 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
fsm_sdata(f, CCP_RESETACK, id, NULL, 0);
break;
-@@ -498,12 +605,11 @@ ccp_protrej(int unit)
+@@ -506,7 +616,7 @@ ccp_protrej(int unit)
fsm_lowerdown(&ccp_fsm[unit]);
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
- if (ccp_gotoptions[unit].mppe) {
+ if (ccp_wantoptions[unit].mppe) {
error("MPPE required but peer negotiation failed");
lcp_close(unit, "MPPE required but peer negotiation failed");
}
--#endif
--
-+#endif /* MPPE */
- }
-
- /*
-@@ -519,7 +625,7 @@ ccp_resetci(fsm *f)
+@@ -527,7 +637,7 @@ ccp_resetci(fsm *f)
all_rejected[f->unit] = 0;
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
- if (go->mppe) {
+ if (go->mppe || go->mppc) {
ccp_options *ao = &ccp_allowoptions[f->unit];
int auth_mschap_bits = auth_done[f->unit];
- #ifdef USE_EAPTLS
-@@ -536,6 +642,7 @@ ccp_resetci(fsm *f)
+ #ifdef PPP_WITH_EAPTLS
+@@ -544,6 +654,7 @@ ccp_resetci(fsm *f)
* NB: If MPPE is required, all other compression opts are invalid.
* So, we return right away if we can't do it.
*/
@@ -404,7 +399,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
/* Leave only the mschap auth bits set */
auth_mschap_bits &= (CHAP_MS_WITHPEER | CHAP_MS_PEER |
-@@ -580,51 +687,80 @@ ccp_resetci(fsm *f)
+@@ -588,49 +699,80 @@ ccp_resetci(fsm *f)
lcp_close(f->unit, "MPPE required but not available");
return;
}
@@ -435,16 +430,13 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
- ao->predictor_2 = go->predictor_2 = 0;
- ao->deflate = go->deflate = 0;
- }
--#endif /* MPPE */
+ }
/*
* Check whether the kernel knows about the various
-- * compression methods we might request.
-+ * compression methods we might request. Key material
-+ * unimportant here.
+ * compression methods we might request.
++ * Key material unimportant here.
*/
--#ifdef MPPE
- if (go->mppe) {
- opt_buf[0] = CI_MPPE;
- opt_buf[1] = CILEN_MPPE;
@@ -462,7 +454,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ opt_buf[4] = 0;
+ opt_buf[5] = MPPE_MPPC;
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE, 0) <= 0)
-+ go->mppc = 0;
++ go->mppc = 0;
+ }
+ if (go->mppe_40) {
+ opt_buf[0] = CI_MPPE;
@@ -472,7 +464,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ opt_buf[4] = 0;
+ opt_buf[5] = MPPE_40BIT;
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0) <= 0)
-+ go->mppe_40 = 0;
++ go->mppe_40 = 0;
+ }
+ if (go->mppe_56) {
+ opt_buf[0] = CI_MPPE;
@@ -482,7 +474,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ opt_buf[4] = 0;
+ opt_buf[5] = MPPE_56BIT;
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0) <= 0)
-+ go->mppe_56 = 0;
++ go->mppe_56 = 0;
+ }
+ if (go->mppe_128) {
+ opt_buf[0] = CI_MPPE;
@@ -492,26 +484,26 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ opt_buf[4] = 0;
+ opt_buf[5] = MPPE_128BIT;
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0) <= 0)
-+ go->mppe_128 = 0;
++ go->mppe_128 = 0;
+ }
+ if (!go->mppe_40 && !go->mppe_56 && !go->mppe_128) {
+ if (ccp_wantoptions[f->unit].mppe) {
-+ error("MPPE required, but kernel has no support.");
-+ lcp_close(f->unit, "MPPE required but not available");
++ error("MPPE required, but kernel has no support.");
++ lcp_close(f->unit, "MPPE required but not available");
+ }
+ go->mppe = go->mppe_stateless = 0;
+ } else {
+ /* MPPE is not compatible with other compression types */
+ if (ccp_wantoptions[f->unit].mppe) {
-+ ao->bsd_compress = go->bsd_compress = 0;
-+ ao->predictor_1 = go->predictor_1 = 0;
-+ ao->predictor_2 = go->predictor_2 = 0;
-+ ao->deflate = go->deflate = 0;
-+ ao->lzs = go->lzs = 0;
++ ao->bsd_compress = go->bsd_compress = 0;
++ ao->predictor_1 = go->predictor_1 = 0;
++ ao->predictor_2 = go->predictor_2 = 0;
++ ao->deflate = go->deflate = 0;
++ ao->lzs = go->lzs = 0;
+ }
+ }
}
- #endif
+ #endif /* PPP_WITH_MPPE */
+ if (go->lzs) {
+ opt_buf[0] = CI_LZS;
+ opt_buf[1] = CILEN_LZS;
@@ -524,7 +516,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
if (go->bsd_compress) {
opt_buf[0] = CI_BSD_COMPRESS;
opt_buf[1] = CILEN_BSD_COMPRESS;
-@@ -679,7 +815,8 @@ static int
+@@ -685,7 +827,8 @@ static int
+ (go->deflate && go->deflate_draft? CILEN_DEFLATE: 0)
+ (go->predictor_1? CILEN_PREDICTOR_1: 0)
+ (go->predictor_2? CILEN_PREDICTOR_2: 0)
@@ -534,7 +526,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
}
/*
-@@ -690,6 +827,8 @@ static void
+@@ -696,6 +839,8 @@ static void
{
int res;
ccp_options *go = &ccp_gotoptions[f->unit];
@@ -543,10 +535,10 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
u_char *p0 = p;
/*
-@@ -698,22 +837,43 @@ static void
+@@ -704,22 +849,42 @@ static void
* in case it gets Acked.
*/
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
- if (go->mppe) {
+ if (go->mppe || go->mppc || (!wo->mppe && ao->mppe)) {
u_char opt_buf[CILEN_MPPE + MPPE_MAX_KEY_LEN];
@@ -562,15 +554,13 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ p[4] = 0;
+ p[5] = (go->mppe_40 ? MPPE_40BIT : 0) | (go->mppe_56 ? MPPE_56BIT : 0) |
+ (go->mppe_128 ? MPPE_128BIT : 0) | (go->mppc ? MPPE_MPPC : 0);
-+
-+ BCOPY(p, opt_buf, CILEN_MPPE);
- BCOPY(mppe_recv_key, &opt_buf[CILEN_MPPE], MPPE_MAX_KEY_LEN);
++ memcpy(opt_buf, p, CILEN_MPPE);
+ mppe_get_recv_key(&opt_buf[CILEN_MPPE], MPPE_MAX_KEY_LEN);
res = ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0);
-- if (res > 0)
-+ if (res > 0) {
+ if (res > 0)
p += CILEN_MPPE;
- else
-+ } else {
++ else {
/* This shouldn't happen, we've already tested it! */
- lcp_close(f->unit, "MPPE required but not available in kernel");
+ go->mppe = go->mppe_40 = go->mppe_56 = go->mppe_128 =
@@ -578,8 +568,8 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ if (ccp_wantoptions[f->unit].mppe)
+ lcp_close(f->unit, "MPPE required but not available in kernel");
+ }
-+ }
-+#endif /* MPPE */
+ }
+ #endif
+ if (go->lzs) {
+ p[0] = CI_LZS;
+ p[1] = CILEN_LZS;
@@ -591,19 +581,11 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ p += CILEN_LZS;
+ } else
+ go->lzs = 0;
- }
--#endif
++ }
if (go->deflate) {
p[0] = go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT;
p[1] = CILEN_DEFLATE;
-@@ -799,30 +959,50 @@ static void
-
- /*
- * ccp_ackci - process a received configure-ack, and return
-- * 1 iff the packet was OK.
-+ * 1 if the packet was OK.
- */
- static int
+@@ -811,24 +976,44 @@ static int
ccp_ackci(fsm *f, u_char *p, int len)
{
ccp_options *go = &ccp_gotoptions[f->unit];
@@ -611,7 +593,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ ccp_options *wo = &ccp_wantoptions[f->unit];
u_char *p0 = p;
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
- if (go->mppe) {
- u_char opt_buf[CILEN_MPPE];
-
@@ -636,11 +618,13 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ go->mppe = 1;
p += CILEN_MPPE;
len -= CILEN_MPPE;
+- /* XXX Cope with first/fast ack */
+- if (len == 0)
+ /* Cope with first/fast ack */
+ if (p == p0 && len == 0)
-+ return 1;
-+ }
-+#endif /* MPPE */
+ return 1;
+ }
+ #endif
+ if (go->lzs) {
+ if (len < CILEN_LZS || p[0] != CI_LZS || p[1] != CILEN_LZS
+ || p[2] != go->lzs_hists>>8 || p[3] != (go->lzs_hists&0xff)
@@ -648,16 +632,14 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ return 0;
+ p += CILEN_LZS;
+ len -= CILEN_LZS;
- /* XXX Cope with first/fast ack */
-- if (len == 0)
++ /* XXX Cope with first/fast ack */
+ if (p == p0 && len == 0)
- return 1;
- }
--#endif
++ return 1;
++ }
if (go->deflate) {
if (len < CILEN_DEFLATE
|| p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
-@@ -885,12 +1065,14 @@ static int
+@@ -891,12 +1076,14 @@ static int
/*
* ccp_nakci - process received configure-nak.
@@ -673,10 +655,10 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
ccp_options no; /* options we've seen already */
ccp_options try; /* options to ask for next time */
-@@ -898,28 +1080,100 @@ static int
+@@ -904,28 +1091,98 @@ static int
try = *go;
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
- if (go->mppe && len >= CILEN_MPPE
- && p[0] == CI_MPPE && p[1] == CILEN_MPPE) {
- no.mppe = 1;
@@ -691,13 +673,8 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
- } else if (((go->mppe | MPPE_OPT_STATEFUL) & try.mppe) != try.mppe) {
- /* Peer must have set options we didn't request (suggest) */
- try.mppe = 0;
-- }
+ if ((go->mppe || go->mppc || (!wo->mppe && ao->mppe)) &&
+ len >= CILEN_MPPE && p[0] == CI_MPPE && p[1] == CILEN_MPPE) {
-
-- if (!try.mppe) {
-- error("MPPE required but peer negotiation failed");
-- lcp_close(f->unit, "MPPE required but peer negotiation failed");
+ if (go->mppc) {
+ no.mppc = 1;
+ if (!(p[5] & MPPE_MPPC))
@@ -770,12 +747,15 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ else
+ if (try.mppe_40 && try.mppe_56)
+ try.mppe_40 = 0;
-+
+
+- if (!try.mppe) {
+- error("MPPE required but peer negotiation failed");
+- lcp_close(f->unit, "MPPE required but peer negotiation failed");
+- }
+ p += CILEN_MPPE;
+ len -= CILEN_MPPE;
}
- #endif /* MPPE */
-+
+ #endif /* PPP_WITH_MPPE */
+ if (go->lzs && len >= CILEN_LZS && p[0] == CI_LZS && p[1] == CILEN_LZS) {
+ no.lzs = 1;
+ if (((p[2]<<8)|p[3]) > 1 || (p[4] != LZS_MODE_SEQ &&
@@ -792,10 +772,10 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
if (go->deflate && len >= CILEN_DEFLATE
&& p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
&& p[1] == CILEN_DEFLATE) {
-@@ -989,14 +1243,50 @@ ccp_rejci(fsm *f, u_char *p, int len)
+@@ -995,14 +1252,50 @@ ccp_rejci(fsm *f, u_char *p, int len)
return -1;
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
- if (go->mppe && len >= CILEN_MPPE
+ if ((go->mppe || go->mppc) && len >= CILEN_MPPE
&& p[0] == CI_MPPE && p[1] == CILEN_MPPE) {
@@ -834,8 +814,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
p += CILEN_MPPE;
len -= CILEN_MPPE;
}
--#endif
-+#endif /* MPPE */
+ #endif
+ if (go->lzs && len >= CILEN_LZS && p[0] == CI_LZS && p[1] == CILEN_LZS) {
+ if (p[2] != go->lzs_hists>>8 || p[3] != (go->lzs_hists&0xff)
+ || p[4] != go->lzs_mode)
@@ -847,7 +826,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
if (go->deflate_correct && len >= CILEN_DEFLATE
&& p[0] == CI_DEFLATE && p[1] == CILEN_DEFLATE) {
if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
-@@ -1056,14 +1346,15 @@ static int
+@@ -1062,13 +1355,13 @@ static int
ccp_reqci(fsm *f, u_char *p, int *lenp, int dont_nak)
{
int ret, newret, res;
@@ -857,19 +836,16 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
ccp_options *ho = &ccp_hisoptions[f->unit];
ccp_options *ao = &ccp_allowoptions[f->unit];
+ ccp_options *wo = &ccp_wantoptions[f->unit];
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
- bool rej_for_ci_mppe = 1; /* Are we rejecting based on a bad/missing */
- /* CI_MPPE, or due to other options? */
--#endif
+ u_char opt_buf[CILEN_MPPE + MPPE_MAX_KEY_LEN];
-+/* int mtu; */
-+#endif /* MPPE */
+ #endif
ret = CONFACK;
- retp = p0 = p;
-@@ -1086,106 +1377,307 @@ ccp_reqci(fsm *f, u_char *p, int *lenp,
+@@ -1092,105 +1385,305 @@ ccp_reqci(fsm *f, u_char *p, int *lenp,
switch (type) {
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
case CI_MPPE:
- if (!ao->mppe || clen != CILEN_MPPE) {
+ if ((!ao->mppc && !ao->mppe) || clen != CILEN_MPPE) {
@@ -877,9 +853,13 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
break;
}
- MPPE_CI_TO_OPTS(&p[2], ho->mppe);
-
+-
- /* Nak if anything unsupported or unknown are set. */
- if (ho->mppe & MPPE_OPT_UNSUPPORTED) {
+- newret = CONFNAK;
+- ho->mppe &= ~MPPE_OPT_UNSUPPORTED;
+- }
+- if (ho->mppe & MPPE_OPT_UNKNOWN) {
+ p2 = p[2];
+ p5 = p[5];
+ /* not sure what they want, tell 'em what we got */
@@ -888,10 +868,6 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ MPPE_MPPC)) != 0 || p[5] == 0) ||
+ (p[2] == 0 && p[3] == 0 && p[4] == 0 && p[5] == 0)) {
newret = CONFNAK;
-- ho->mppe &= ~MPPE_OPT_UNSUPPORTED;
-- }
-- if (ho->mppe & MPPE_OPT_UNKNOWN) {
-- newret = CONFNAK;
- ho->mppe &= ~MPPE_OPT_UNKNOWN;
+ p[2] = (wo->mppe_stateless ? MPPE_STATELESS : 0);
+ p[3] = 0;
@@ -916,7 +892,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ if ((p[5] & MPPE_MPPC)) {
+ if (ao->mppc) {
+ ho->mppc = 1;
-+ BCOPY(p, opt_buf, CILEN_MPPE);
++ memcpy(opt_buf, p, CILEN_MPPE);
+ opt_buf[2] = opt_buf[3] = opt_buf[4] = 0;
+ opt_buf[5] = MPPE_MPPC;
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE, 1) <= 0) {
@@ -931,13 +907,9 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ p[5] &= ~MPPE_MPPC;
+ newret = CONFNAK;
+ }
- }
- }
-
-- /* Find out which of {S,L} are set. */
-- if ((ho->mppe & MPPE_OPT_128)
-- && (ho->mppe & MPPE_OPT_40)) {
-- /* Both are set, negotiate the strongest. */
++ }
++ }
++
+ if (ao->mppe)
+ ho->mppe = 1;
+
@@ -960,9 +932,13 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ wo->mppe_stateless = 0;
+ newret = CONFNAK;
+ p[2] |= MPPE_STATELESS;
-+ }
-+ }
-+
+ }
+ }
+
+- /* Find out which of {S,L} are set. */
+- if ((ho->mppe & MPPE_OPT_128)
+- && (ho->mppe & MPPE_OPT_40)) {
+- /* Both are set, negotiate the strongest. */
+ if ((p[5] & ~MPPE_MPPC) == (MPPE_40BIT|MPPE_56BIT|MPPE_128BIT)) {
newret = CONFNAK;
- if (ao->mppe & MPPE_OPT_128)
@@ -975,8 +951,8 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ if (ao->mppe_128) {
+ ho->mppe_128 = 1;
+ p[5] &= ~(MPPE_40BIT|MPPE_56BIT);
-+ BCOPY(p, opt_buf, CILEN_MPPE);
-+ BCOPY(mppe_send_key, &opt_buf[CILEN_MPPE],
++ memcpy(opt_buf, p, CILEN_MPPE);
++ mppe_get_send_key(&opt_buf[CILEN_MPPE],
+ MPPE_MAX_KEY_LEN);
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
+ MPPE_MAX_KEY_LEN, 1) <= 0) {
@@ -999,8 +975,8 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ if (ao->mppe_128) {
+ ho->mppe_128 = 1;
+ p[5] &= ~MPPE_56BIT;
-+ BCOPY(p, opt_buf, CILEN_MPPE);
-+ BCOPY(mppe_send_key, &opt_buf[CILEN_MPPE],
++ memcpy(opt_buf, p, CILEN_MPPE);
++ mppe_get_send_key(&opt_buf[CILEN_MPPE],
+ MPPE_MAX_KEY_LEN);
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
+ MPPE_MAX_KEY_LEN, 1) <= 0) {
@@ -1023,8 +999,8 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ if (ao->mppe_128) {
+ ho->mppe_128 = 1;
+ p[5] &= ~MPPE_40BIT;
-+ BCOPY(p, opt_buf, CILEN_MPPE);
-+ BCOPY(mppe_send_key, &opt_buf[CILEN_MPPE],
++ memcpy(opt_buf, p, CILEN_MPPE);
++ mppe_get_send_key(&opt_buf[CILEN_MPPE],
+ MPPE_MAX_KEY_LEN);
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
+ MPPE_MAX_KEY_LEN, 1) <= 0) {
@@ -1041,8 +1017,8 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ if ((p[5] & ~MPPE_MPPC) == MPPE_128BIT) {
+ if (ao->mppe_128) {
+ ho->mppe_128 = 1;
-+ BCOPY(p, opt_buf, CILEN_MPPE);
-+ BCOPY(mppe_send_key, &opt_buf[CILEN_MPPE],
++ memcpy(opt_buf, p, CILEN_MPPE);
++ mppe_get_send_key(&opt_buf[CILEN_MPPE],
+ MPPE_MAX_KEY_LEN);
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
+ MPPE_MAX_KEY_LEN, 1) <= 0) {
@@ -1062,8 +1038,8 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ if (ao->mppe_56) {
+ ho->mppe_56 = 1;
+ p[5] &= ~MPPE_40BIT;
-+ BCOPY(p, opt_buf, CILEN_MPPE);
-+ BCOPY(mppe_send_key, &opt_buf[CILEN_MPPE],
++ memcpy(opt_buf, p, CILEN_MPPE);
++ mppe_get_send_key(&opt_buf[CILEN_MPPE],
+ MPPE_MAX_KEY_LEN);
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
+ MPPE_MAX_KEY_LEN, 1) <= 0) {
@@ -1082,8 +1058,8 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ if ((p[5] & ~MPPE_MPPC) == MPPE_56BIT) {
+ if (ao->mppe_56) {
+ ho->mppe_56 = 1;
-+ BCOPY(p, opt_buf, CILEN_MPPE);
-+ BCOPY(mppe_send_key, &opt_buf[CILEN_MPPE],
++ memcpy(opt_buf, p, CILEN_MPPE);
++ mppe_get_send_key(&opt_buf[CILEN_MPPE],
+ MPPE_MAX_KEY_LEN);
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
+ MPPE_MAX_KEY_LEN, 1) <= 0) {
@@ -1101,8 +1077,8 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ if ((p[5] & ~MPPE_MPPC) == MPPE_40BIT) {
+ if (ao->mppe_40) {
+ ho->mppe_40 = 1;
-+ BCOPY(p, opt_buf, CILEN_MPPE);
-+ BCOPY(mppe_send_key, &opt_buf[CILEN_MPPE],
++ memcpy(opt_buf, p, CILEN_MPPE);
++ mppe_get_send_key(&opt_buf[CILEN_MPPE],
+ MPPE_MAX_KEY_LEN);
+ if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
+ MPPE_MAX_KEY_LEN, 1) <= 0) {
@@ -1155,8 +1131,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
- int mtu;
-
- BCOPY(p, opt_buf, CILEN_MPPE);
-- BCOPY(mppe_send_key, &opt_buf[CILEN_MPPE],
-- MPPE_MAX_KEY_LEN);
+- mppe_get_send_key(&opt_buf[CILEN_MPPE], MPPE_MAX_KEY_LEN);
- if (ccp_test(f->unit, opt_buf,
- CILEN_MPPE + MPPE_MAX_KEY_LEN, 1) <= 0) {
- /* This shouldn't happen, we've already tested it! */
@@ -1170,9 +1145,9 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
- * because MPPE frames **grow**. The kernel [must]
- * allocate MPPE_PAD extra bytes in xmit buffers.
- */
-- mtu = netif_get_mtu(f->unit);
+- mtu = ppp_get_mtu(f->unit);
- if (mtu)
-- netif_set_mtu(f->unit, mtu - MPPE_PAD);
+- ppp_set_mtu(f->unit, mtu - MPPE_PAD);
- else
- newret = CONFREJ;
- }
@@ -1218,8 +1193,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ }
+*/
break;
- #endif /* MPPE */
-+
+ #endif /* PPP_WITH_MPPE */
+ case CI_LZS:
+ if (!ao->lzs || clen != CILEN_LZS) {
+ newret = CONFREJ;
@@ -1248,11 +1222,11 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
case CI_DEFLATE:
case CI_DEFLATE_DRAFT:
if (!ao->deflate || clen != CILEN_DEFLATE
-@@ -1327,12 +1819,6 @@ ccp_reqci(fsm *f, u_char *p, int *lenp,
+@@ -1332,12 +1825,6 @@ ccp_reqci(fsm *f, u_char *p, int *lenp,
else
*lenp = retp - p0;
}
--#ifdef MPPE
+-#ifdef PPP_WITH_MPPE
- if (ret == CONFREJ && ao->mppe && rej_for_ci_mppe) {
- error("MPPE required but peer negotiation failed");
- lcp_close(f->unit, "MPPE required but peer negotiation failed");
@@ -1261,7 +1235,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
return ret;
}
-@@ -1353,24 +1839,35 @@ method_name(ccp_options *opt, ccp_option
+@@ -1358,24 +1845,35 @@ method_name(ccp_options *opt, ccp_option
char *p = result;
char *q = result + sizeof(result); /* 1 past result */
@@ -1313,22 +1287,16 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
case CI_DEFLATE:
case CI_DEFLATE_DRAFT:
if (opt2 != NULL && opt2->deflate_size != opt->deflate_size)
-@@ -1425,12 +1922,12 @@ ccp_up(fsm *f)
+@@ -1430,7 +1928,7 @@ ccp_up(fsm *f)
} else if (ANY_COMPRESS(*ho))
notice("%s transmit compression enabled", method_name(ho, NULL));
- #ifdef MPPE
+ #ifdef PPP_WITH_MPPE
- if (go->mppe) {
+ if (go->mppe || go->mppc) {
- BZERO(mppe_recv_key, MPPE_MAX_KEY_LEN);
- BZERO(mppe_send_key, MPPE_MAX_KEY_LEN);
+ mppe_clear_keys();
continue_networks(f->unit); /* Bring up IP et al */
}
--#endif
-+#endif /* MPPE */
- }
-
- /*
-@@ -1452,7 +1949,7 @@ ccp_down(fsm *f)
+@@ -1456,7 +1954,7 @@ ccp_down(fsm *f)
lcp_close(f->unit, "MPPE disabled");
}
}
@@ -1337,8 +1305,8 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
}
/*
-@@ -1509,24 +2006,28 @@ ccp_printpkt(u_char *p, int plen,
- #ifdef MPPE
+@@ -1513,24 +2011,28 @@ ccp_printpkt(u_char *p, int plen,
+ #ifdef PPP_WITH_MPPE
case CI_MPPE:
if (optlen >= CILEN_MPPE) {
- u_char mppe_opts;
@@ -1367,8 +1335,7 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
p += CILEN_MPPE;
}
break;
--#endif
-+#endif /* MPPE */
+ #endif
+ case CI_LZS:
+ if (optlen >= CILEN_LZS) {
+ printer(arg, "lzs %.2x %.2x %.2x", p[2], p[3], p[4]);
@@ -1378,15 +1345,15 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
case CI_DEFLATE:
case CI_DEFLATE_DRAFT:
if (optlen >= CILEN_DEFLATE) {
-@@ -1609,6 +2110,7 @@ ccp_datainput(int unit, u_char *pkt, int
+@@ -1613,6 +2115,7 @@ ccp_datainput(int unit, u_char *pkt, int
error("Lost compression sync: disabling compression");
ccp_close(unit, "Lost compression sync");
- #ifdef MPPE
-+ /* My module dosn't need this. J.D., 2003-07-06 */
+ #ifdef PPP_WITH_MPPE
++ /* My module doesn't need this. J.D., 2003-07-06 */
/*
* If we were doing MPPE, we must also take the link down.
*/
-@@ -1616,9 +2118,18 @@ ccp_datainput(int unit, u_char *pkt, int
+@@ -1620,9 +2123,18 @@ ccp_datainput(int unit, u_char *pkt, int
error("Too many MPPE errors, closing LCP");
lcp_close(unit, "Too many MPPE errors");
}
@@ -1406,18 +1373,18 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
* Send a reset-request to reset the peer's compressor.
* We don't do that if we are still waiting for an
* acknowledgement to a previous reset-request.
-@@ -1648,4 +2159,3 @@ ccp_rack_timeout(void *arg)
+@@ -1652,4 +2164,3 @@ ccp_rack_timeout(void *arg)
} else
ccp_localstate[f->unit] &= ~RACK_PENDING;
}
-
---- ppp-2.4.8/pppd/ccp.h.orig 2020-04-16 06:33:49.345695328 +0200
-+++ ppp-2.4.8/pppd/ccp.h 2020-04-16 07:25:41.255503333 +0200
-@@ -37,9 +37,17 @@
+--- ppp-2.5.0/pppd/ccp.h.orig 2023-09-02 09:59:26.758158825 +0200
++++ ppp-2.5.0/pppd/ccp.h 2023-09-03 14:17:52.576087631 +0200
+@@ -45,9 +45,17 @@ typedef struct ccp_options {
bool predictor_2; /* do Predictor-2? */
bool deflate_correct; /* use correct code for deflate? */
bool deflate_draft; /* use draft RFC code for deflate? */
-- u_char mppe; /* MPPE bitfield */
+- unsigned char mppe; /* MPPE bitfield */
+ bool lzs; /* do Stac LZS? */
+ bool mppc; /* do MPPC? */
+ bool mppe; /* do MPPE? */
@@ -1425,17 +1392,16 @@ diff -ruN ppp-2.4.3.orig/include/net/ppp-comp.h ppp-2.4.3/include/net/ppp-comp.h
+ bool mppe_56; /* allow 56 bit encryption? */
+ bool mppe_128; /* allow 128 bit encryption? */
+ bool mppe_stateless; /* allow stateless encryption */
- u_short bsd_bits; /* # bits/code for BSD Compress */
- u_short deflate_size; /* lg(window size) for Deflate */
-+ u_short lzs_mode; /* LZS check mode */
-+ u_short lzs_hists; /* number of LZS histories */
+ unsigned short bsd_bits; /* # bits/code for BSD Compress */
+ unsigned short deflate_size; /* lg(window size) for Deflate */
++ unsigned short lzs_mode; /* LZS check mode */
++ unsigned short lzs_hists; /* number of LZS histories */
short method; /* code for chosen compression method */
} ccp_options;
-diff -ruN ppp-2.4.3.orig/pppd/chap_ms.c ppp-2.4.3/pppd/chap_ms.c
---- ppp-2.4.3.orig/pppd/chap_ms.c 2004-11-12 10:57:43.000000000 +0100
-+++ ppp-2.4.3/pppd/chap_ms.c 2004-11-21 13:54:09.000000000 +0100
-@@ -895,13 +895,17 @@
+--- ppp-2.5.0/pppd/mppe.c.orig 2022-12-30 02:12:39.000000000 +0100
++++ ppp-2.5.0/pppd/mppe.c 2023-09-03 14:20:18.168632222 +0200
+@@ -309,13 +309,17 @@ mppe_set_enc_types(int policy, int types
/*
* Disable undesirable encryption types. Note that we don't ENABLE
* any encryption types, to avoid overriding manual configuration.
@@ -1533,3 +1499,13 @@ diff -ruN ppp-2.4.3.orig/pppd/pppd.8 ppp-2.4.3/pppd/pppd.8
.TP
.B require\-mschap
Require the peer to authenticate itself using MS\-CHAP [Microsoft Challenge
+--- ppp-2.5.0/pppd/Makefile.am.orig 2023-03-25 05:38:30.000000000 +0100
++++ ppp-2.5.0/pppd/Makefile.am 2023-09-03 21:04:02.204066024 +0200
+@@ -93,6 +93,7 @@ endif
+
+ if LINUX
+ pppd_SOURCES += sys-linux.c
++pppd_CPPFLAGS += -I${top_srcdir}/include
+ noinst_HEADERS += termios_linux.h
+ pppd_LIBS += $(CRYPT_LIBS) $(UTIL_LIBS)
+ endif
diff --git a/ppp-ifpppstatsreq.patch b/ppp-ifpppstatsreq.patch
deleted file mode 100644
index 63b79cf..0000000
--- a/ppp-ifpppstatsreq.patch
+++ /dev/null
@@ -1,140 +0,0 @@
---- ppp-2.4.5/pppd/sys-linux.c~ 2013-02-16 23:11:59.688775791 +0100
-+++ ppp-2.4.5/pppd/sys-linux.c 2013-02-16 23:14:00.675182263 +0100
-@@ -1364,20 +1364,22 @@
- int
- get_ppp_stats(int u, struct pppd_stats *stats)
- {
-- struct ifpppstatsreq req;
-+ struct ifreq req;
-+ struct ppp_stats rstats;
-
- memset (&req, 0, sizeof (req));
-+ memset (&rstats, 0, sizeof (rstats));
-
-- req.stats_ptr = (caddr_t) &req.stats;
-- strlcpy(req.ifr__name, ifname, sizeof(req.ifr__name));
-+ req.ifr_data = (caddr_t) &rstats;
-+ strlcpy(req.ifr_name, ifname, sizeof(req.ifr_name));
- if (ioctl(sock_fd, SIOCGPPPSTATS, &req) < 0) {
- error("Couldn't get PPP statistics: %m");
- return 0;
- }
-- stats->bytes_in = req.stats.p.ppp_ibytes;
-- stats->bytes_out = req.stats.p.ppp_obytes;
-- stats->pkts_in = req.stats.p.ppp_ipackets;
-- stats->pkts_out = req.stats.p.ppp_opackets;
-+ stats->bytes_in = rstats.p.ppp_ibytes;
-+ stats->bytes_out = rstats.p.ppp_obytes;
-+ stats->pkts_in = rstats.p.ppp_ipackets;
-+ stats->pkts_out = rstats.p.ppp_opackets;
- return 1;
- }
-
---- ppp-2.4.5/pppstats/pppstats.c~ 2013-02-16 23:15:47.231215213 +0100
-+++ ppp-2.4.5/pppstats/pppstats.c 2013-02-16 23:17:58.624537526 +0100
-@@ -143,12 +143,14 @@
- static void
- get_ppp_stats(struct ppp_stats *curp)
- {
-- struct ifpppstatsreq req;
-+ struct ifreq req;
-+ struct ppp_stats rstats;
-
- memset (&req, 0, sizeof (req));
-+ memset (&rstats, 0, sizeof (rstats));
-
- #ifdef __linux__
-- req.stats_ptr = (caddr_t) &req.stats;
-+ req.ifr_data = (caddr_t) &rstats;
- #undef ifr_name
- #define ifr_name ifr__name
- #endif
-@@ -162,7 +164,7 @@
- perror("couldn't get PPP statistics");
- exit(1);
- }
-- *curp = req.stats;
-+ *curp = rstats;
- }
-
- static void
---- ppp-2.4.5/pppstats/pppstats.c~ 2013-02-16 23:20:18.148057503 +0100
-+++ ppp-2.4.5/pppstats/pppstats.c 2013-02-16 23:20:27.984972162 +0100
-@@ -149,11 +149,7 @@
- memset (&req, 0, sizeof (req));
- memset (&rstats, 0, sizeof (rstats));
-
--#ifdef __linux__
- req.ifr_data = (caddr_t) &rstats;
--#undef ifr_name
--#define ifr_name ifr__name
--#endif
-
- strncpy(req.ifr_name, interface, IFNAMSIZ);
- req.ifr_name[IFNAMSIZ - 1] = 0;
---- ppp-2.4.5/pppstats/pppstats.c~ 2013-02-16 23:20:49.762187752 +0100
-+++ ppp-2.4.5/pppstats/pppstats.c 2013-02-16 23:23:53.923478616 +0100
-@@ -167,15 +167,13 @@
- static void
- get_ppp_cstats(struct ppp_comp_stats *csp)
- {
-- struct ifpppcstatsreq creq;
-+ struct ifreq creq;
-+ struct ppp_comp_stats rstats;
-
- memset (&creq, 0, sizeof (creq));
-+ memset (&rstats, 0, sizeof (rstats));
-
--#ifdef __linux__
-- creq.stats_ptr = (caddr_t) &creq.stats;
--#undef ifr_name
--#define ifr_name ifr__name
--#endif
-+ creq.ifr_data = (caddr_t) &rstats;
-
- strncpy(creq.ifr_name, interface, IFNAMSIZ);
- creq.ifr_name[IFNAMSIZ - 1] = 0;
-@@ -192,28 +190,28 @@
- }
-
- #ifdef __linux__
-- if (creq.stats.c.bytes_out == 0) {
-- creq.stats.c.bytes_out = creq.stats.c.comp_bytes + creq.stats.c.inc_bytes;
-- creq.stats.c.in_count = creq.stats.c.unc_bytes;
-+ if (rstats.c.bytes_out == 0) {
-+ rstats.c.bytes_out = rstats.c.comp_bytes + rstats.c.inc_bytes;
-+ rstats.c.in_count = rstats.c.unc_bytes;
- }
-- if (creq.stats.c.bytes_out == 0)
-- creq.stats.c.ratio = 0.0;
-+ if (rstats.c.bytes_out == 0)
-+ rstats.c.ratio = 0.0;
- else
-- creq.stats.c.ratio = 256.0 * creq.stats.c.in_count /
-- creq.stats.c.bytes_out;
-+ rstats.c.ratio = 256.0 * rstats.c.in_count /
-+ rstats.c.bytes_out;
-
-- if (creq.stats.d.bytes_out == 0) {
-- creq.stats.d.bytes_out = creq.stats.d.comp_bytes + creq.stats.d.inc_bytes;
-- creq.stats.d.in_count = creq.stats.d.unc_bytes;
-+ if (rstats.d.bytes_out == 0) {
-+ rstats.d.bytes_out = rstats.d.comp_bytes + rstats.d.inc_bytes;
-+ rstats.d.in_count = rstats.d.unc_bytes;
- }
-- if (creq.stats.d.bytes_out == 0)
-- creq.stats.d.ratio = 0.0;
-+ if (rstats.d.bytes_out == 0)
-+ rstats.d.ratio = 0.0;
- else
-- creq.stats.d.ratio = 256.0 * creq.stats.d.in_count /
-- creq.stats.d.bytes_out;
-+ rstats.d.ratio = 256.0 * rstats.d.in_count /
-+ rstats.d.bytes_out;
- #endif
-
-- *csp = creq.stats;
-+ *csp = rstats;
- }
-
- #else /* STREAMS */
diff --git a/ppp-lib64.patch b/ppp-lib64.patch
deleted file mode 100644
index 2d39154..0000000
--- a/ppp-lib64.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-diff -urN ppp-2.4.4.org/pppd/pathnames.h ppp-2.4.4/pppd/pathnames.h
---- ppp-2.4.4.org/pppd/pathnames.h 2005-08-26 01:59:34.000000000 +0200
-+++ ppp-2.4.4/pppd/pathnames.h 2006-07-09 13:33:56.089093750 +0200
-@@ -57,9 +57,9 @@
-
- #ifdef PLUGIN
- #ifdef __STDC__
--#define _PATH_PLUGIN DESTDIR "/lib/pppd/" VERSION
-+#define _PATH_PLUGIN DESTDIR "/lib64/pppd/" VERSION
- #else /* __STDC__ */
--#define _PATH_PLUGIN "/usr/lib/pppd"
-+#define _PATH_PLUGIN "/usr/lib64/pppd"
- #endif /* __STDC__ */
-
- #endif /* PLUGIN */
-diff -urN ppp-2.4.4.org/pppd/plugins/Makefile.linux ppp-2.4.4/pppd/plugins/Makefile.linux
---- ppp-2.4.4.org/pppd/plugins/Makefile.linux 2006-07-09 13:32:56.401363000 +0200
-+++ ppp-2.4.4/pppd/plugins/Makefile.linux 2006-07-09 13:33:28.519370750 +0200
-@@ -7,7 +7,7 @@
- DESTDIR = $(INSTROOT)@DESTDIR@
- BINDIR = $(DESTDIR)/sbin
- MANDIR = $(DESTDIR)/share/man/man8
--LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
-+LIBDIR = $(DESTDIR)/lib64/pppd/$(VERSION)
-
- CFLAGS = $(COPTS) -I.. -I../../include -fPIC
- LDFLAGS_SHARED = -shared
-diff -urN ppp-2.4.4.org/pppd/plugins/pppoatm/Makefile.linux ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux
---- ppp-2.4.4.org/pppd/plugins/pppoatm/Makefile.linux 2004-11-14 02:12:10.000000000 +0100
-+++ ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux 2006-07-09 13:33:28.523371000 +0200
-@@ -7,7 +7,7 @@
- COPTS=@CFLAGS@
-
- DESTDIR = $(INSTROOT)@DESTDIR@
--LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
-+LIBDIR = $(DESTDIR)/lib64/pppd/$(VERSION)
-
- VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-
-diff -urN ppp-2.4.4.org/pppd/plugins/radius/Makefile.linux ppp-2.4.4/pppd/plugins/radius/Makefile.linux
---- ppp-2.4.4.org/pppd/plugins/radius/Makefile.linux 2006-07-09 13:32:56.401363000 +0200
-+++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux 2006-07-09 13:33:28.523371000 +0200
-@@ -5,7 +5,7 @@
-
- DESTDIR = $(INSTROOT)@DESTDIR@
- MANDIR = $(DESTDIR)/share/man/man8
--LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
-+LIBDIR = $(DESTDIR)/lib64/pppd/$(VERSION)
-
- VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-
---- ppp-2.4.4.org/pppd/plugins/pppoe/Makefile.linux 2006-07-09 13:32:56.401363000 +0200
-+++ ppp-2.4.4/pppd/plugins/pppoe/Makefile.linux 2006-07-09 13:33:28.523371000 +0200
-@@ -15,7 +15,7 @@
-
- DESTDIR = $(INSTROOT)@DESTDIR@
- BINDIR = $(DESTDIR)/sbin
--LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
-+LIBDIR = $(DESTDIR)/lib64/pppd/$(PPPDVERSION)
-
- PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-
---- ppp-2.4.9/pppd/plugins/pppol2tp/Makefile.linux~ 2021-01-05 01:06:37.000000000 +0200
-+++ ppp-2.4.9/pppd/plugins/pppol2tp/Makefile.linux 2021-01-06 12:47:44.418302301 +0200
-@@ -4,7 +4,7 @@
- COPTS=@CFLAGS@
-
- DESTDIR = $(INSTROOT)/@DESTDIR@
--LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
-+LIBDIR = $(DESTDIR)/lib64/pppd/$(VERSION)
-
- VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-
diff --git a/ppp-libx32.patch b/ppp-libx32.patch
deleted file mode 100644
index f9df60c..0000000
--- a/ppp-libx32.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-diff -urN ppp-2.4.4.org/pppd/pathnames.h ppp-2.4.4/pppd/pathnames.h
---- ppp-2.4.4.org/pppd/pathnames.h 2005-08-26 01:59:34.000000000 +0200
-+++ ppp-2.4.4/pppd/pathnames.h 2006-07-09 13:33:56.089093750 +0200
-@@ -57,9 +57,9 @@
-
- #ifdef PLUGIN
- #ifdef __STDC__
--#define _PATH_PLUGIN DESTDIR "/lib/pppd/" VERSION
-+#define _PATH_PLUGIN DESTDIR "/libx32/pppd/" VERSION
- #else /* __STDC__ */
--#define _PATH_PLUGIN "/usr/lib/pppd"
-+#define _PATH_PLUGIN "/usr/libx32/pppd"
- #endif /* __STDC__ */
-
- #endif /* PLUGIN */
-diff -urN ppp-2.4.4.org/pppd/plugins/Makefile.linux ppp-2.4.4/pppd/plugins/Makefile.linux
---- ppp-2.4.4.org/pppd/plugins/Makefile.linux 2006-07-09 13:32:56.401363000 +0200
-+++ ppp-2.4.4/pppd/plugins/Makefile.linux 2006-07-09 13:33:28.519370750 +0200
-@@ -7,7 +7,7 @@
- DESTDIR = $(INSTROOT)@DESTDIR@
- BINDIR = $(DESTDIR)/sbin
- MANDIR = $(DESTDIR)/share/man/man8
--LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
-+LIBDIR = $(DESTDIR)/libx32/pppd/$(VERSION)
-
- CFLAGS = $(COPTS) -I.. -I../../include -fPIC
- LDFLAGS_SHARED = -shared
-diff -urN ppp-2.4.4.org/pppd/plugins/pppoatm/Makefile.linux ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux
---- ppp-2.4.4.org/pppd/plugins/pppoatm/Makefile.linux 2004-11-14 02:12:10.000000000 +0100
-+++ ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux 2006-07-09 13:33:28.523371000 +0200
-@@ -7,7 +7,7 @@
- COPTS=@CFLAGS@
-
- DESTDIR = $(INSTROOT)@DESTDIR@
--LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
-+LIBDIR = $(DESTDIR)/libx32/pppd/$(VERSION)
-
- VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-
-diff -urN ppp-2.4.4.org/pppd/plugins/radius/Makefile.linux ppp-2.4.4/pppd/plugins/radius/Makefile.linux
---- ppp-2.4.4.org/pppd/plugins/radius/Makefile.linux 2006-07-09 13:32:56.401363000 +0200
-+++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux 2006-07-09 13:33:28.523371000 +0200
-@@ -5,7 +5,7 @@
-
- DESTDIR = $(INSTROOT)@DESTDIR@
- MANDIR = $(DESTDIR)/share/man/man8
--LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
-+LIBDIR = $(DESTDIR)/libx32/pppd/$(VERSION)
-
- VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-
-diff -urN ppp-2.4.4.org/pppd/plugins/pppoe/Makefile.linux ppp-2.4.4/pppd/plugins/pppoe/Makefile.linux
---- ppp-2.4.4.org/pppd/plugins/pppoe/Makefile.linux 2006-07-09 13:32:56.401363000 +0200
-+++ ppp-2.4.4/pppd/plugins/pppoe/Makefile.linux 2006-07-09 13:33:28.523371000 +0200
-@@ -15,7 +15,7 @@
-
- DESTDIR = $(INSTROOT)@DESTDIR@
- BINDIR = $(DESTDIR)/sbin
--LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
-+LIBDIR = $(DESTDIR)/libx32/pppd/$(PPPDVERSION)
-
- PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-
---- ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux~ 2010-05-23 20:09:01.894181407 +0200
-+++ ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux 2010-05-23 20:10:05.074174654 +0200
-@@ -7,7 +7,7 @@
- COPTS=@CFLAGS@
-
- DESTDIR = $(INSTROOT)/@DESTDIR@
--LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
-+LIBDIR = $(DESTDIR)/libx32/pppd/$(VERSION)
-
- VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
-
diff --git a/ppp-make.patch b/ppp-make.patch
deleted file mode 100644
index c740108..0000000
--- a/ppp-make.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- ppp-2.4.9/pppd/Makefile.linux.orig 2021-01-05 00:06:37.000000000 +0100
-+++ ppp-2.4.9/pppd/Makefile.linux 2021-01-09 10:15:09.846752928 +0100
-@@ -74,7 +74,7 @@
- PLUGIN=y
-
- # Enable Microsoft proprietary Callback Control Protocol
--#CBCP=y
-+CBCP=y
-
- # Enable EAP SRP-SHA1 authentication (requires libsrp)
- #USE_SRP=y
---- ppp-2.4.9/configure.orig 2021-01-05 00:06:37.000000000 +0100
-+++ ppp-2.4.9/configure 2021-01-09 19:19:54.306352685 +0100
-@@ -122,8 +122,8 @@
- if [ -f $1 ]; then
- echo " $2 <= $1"
- sed -e "s, at DESTDIR@,$DESTDIR,g" -e "s, at SYSCONF@,$SYSCONF,g" \
-- -e "s, at CROSS_COMPILE@,$CROSS_COMPILE,g" -e "s, at CC@,$CC,g" \
-- -e "s, at CFLAGS@,$CFLAGS,g" $1 >$2
-+ -e "s, at CROSS_COMPILE@,$CROSS_COMPILE,g" -e "s|@CC@|$CC|g" \
-+ -e "s|@CFLAGS@|$CFLAGS|g" $1 >$2
- fi
- }
-
diff --git a/ppp-openssl.patch b/ppp-openssl.patch
deleted file mode 100644
index de4d03e..0000000
--- a/ppp-openssl.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- ppp-2.4.3/pppd/sha1.h.orig 2004-10-25 01:27:49.000000000 +0200
-+++ ppp-2.4.3/pppd/sha1.h 2005-01-08 23:29:27.503494240 +0100
-@@ -2,12 +2,11 @@
-
- /* If OpenSSL is in use, then use that version of SHA-1 */
- #ifdef OPENSSL
--#include <t_sha.h>
-+#include <openssl/sha.h>
-+#define SHA1_CTX SHA_CTX
- #define __SHA1_INCLUDE_
- #endif
-
--#ifndef __SHA1_INCLUDE_
--
- #ifndef SHA1_SIGNATURE_SIZE
- #ifdef SHA_DIGESTSIZE
- #define SHA1_SIGNATURE_SIZE SHA_DIGESTSIZE
-@@ -16,6 +14,8 @@
- #endif
- #endif
-
-+#ifndef __SHA1_INCLUDE_
-+
- typedef struct {
- u_int32_t state[5];
- u_int32_t count[2];
diff --git a/pppd-2.4.2-chapms-strip-domain.patch b/pppd-2.4.2-chapms-strip-domain.patch
index ebabbbd..78a2294 100644
--- a/pppd-2.4.2-chapms-strip-domain.patch
+++ b/pppd-2.4.2-chapms-strip-domain.patch
@@ -1,15 +1,14 @@
-diff -uNra ppp-2.4.2/pppd/auth.c ppp-2.4.2-new/pppd/auth.c
---- ppp-2.4.2/pppd/auth.c Thu Jun 12 00:56:26 2003
-+++ ppp-2.4.2-new/pppd/auth.c Sat Dec 20 19:21:38 2003
-@@ -232,6 +232,7 @@
- #ifdef CHAPMS
+--- ppp-2.5.0/pppd/auth.c.orig 2023-03-25 05:38:30.000000000 +0100
++++ ppp-2.5.0/pppd/auth.c 2023-08-21 06:29:42.669826958 +0200
+@@ -242,6 +242,7 @@ bool refuse_eap = 0; /* Don't wanna aut
+ #ifdef PPP_WITH_CHAPMS
bool refuse_mschap = 0; /* Don't wanna auth. ourselves with MS-CHAP */
bool refuse_mschap_v2 = 0; /* Don't wanna auth. ourselves with MS-CHAPv2 */
+bool ms_ignore_domain = 0; /* Ignore any MS domain prefix */
#else
bool refuse_mschap = 1; /* Don't wanna auth. ourselves with MS-CHAP */
bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */
-@@ -319,6 +320,8 @@
+@@ -354,6 +355,8 @@ struct option auth_options[] = {
"Require MS-CHAPv2 authentication from peer",
OPT_ALIAS | OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT_V2,
&lcp_wantoptions[0].chap_mdtype },
@@ -18,14 +17,13 @@ diff -uNra ppp-2.4.2/pppd/auth.c ppp-2.4.2-new/pppd/auth.c
#endif
{ "refuse-pap", o_bool, &refuse_pap,
-diff -uNra ppp-2.4.2/pppd/chap-new.c ppp-2.4.2-new/pppd/chap-new.c
---- ppp-2.4.2/pppd/chap-new.c Thu Nov 27 22:22:36 2003
-+++ ppp-2.4.2-new/pppd/chap-new.c Sat Dec 20 19:17:42 2003
-@@ -396,6 +396,14 @@
+--- ppp-2.5.0/pppd/chap.c.orig 2023-08-21 06:25:48.917759969 +0200
++++ ppp-2.5.0/pppd/chap.c 2023-08-21 06:25:52.174408993 +0200
+@@ -453,6 +453,14 @@ chap_verify_response(char *name, char *o
int ok;
unsigned char secret[MAXSECRETLEN];
int secret_len;
-+#ifdef CHAPMS
++#ifdef PPP_WITH_CHAPMS
+ char nametmp[MAXNAMELEN];
+
+ if (ms_ignore_domain && strrchr(name, '\\')) {
@@ -36,17 +34,16 @@ diff -uNra ppp-2.4.2/pppd/chap-new.c ppp-2.4.2-new/pppd/chap-new.c
/* Get the secret that the peer is supposed to know */
if (!get_secret(0, name, ourname, (char *)secret, &secret_len, 1)) {
-diff -uNra ppp-2.4.2/pppd/pppd.h ppp-2.4.2-new/pppd/pppd.h
---- ppp-2.4.2/pppd/pppd.h Mon Apr 7 01:01:46 2003
-+++ ppp-2.4.2-new/pppd/pppd.h Sat Dec 20 18:58:23 2003
-@@ -310,6 +310,10 @@
- extern bool dryrun; /* check everything, print options, exit */
- extern int child_wait; /* # seconds to wait for children at end */
+--- ppp-2.5.0/pppd/pppd-private.h.orig 2022-12-30 02:12:39.000000000 +0100
++++ ppp-2.5.0/pppd/pppd-private.h 2023-08-21 06:28:01.690374011 +0200
+@@ -207,6 +207,10 @@ extern int privileged_option; /* set i
+ extern char *option_source; /* string saying where the option came from */
+ extern int option_priority; /* priority of current options */
-+#ifdef CHAPMS
++#ifdef PPP_WITH_CHAPMS
+extern bool ms_ignore_domain; /* Ignore any MS domain prefix */
+#endif
+
- #ifdef USE_EAPTLS
- extern char *crl_dir;
- extern char *crl_file;
+ #ifdef PPP_WITH_IPV6CP
+ extern char path_ipv6up[]; /* pathname of ipv6-up script */
+ extern char path_ipv6down[]; /* pathname of ipv6-down script */
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ppp.git/commitdiff/7b0696808ab3e604921b1dc40a277b4aaded2ba8
More information about the pld-cvs-commit
mailing list