[openwrt/openwrt] ppp: update to 2.5.1

LEDE Commits lede-commits at lists.infradead.org
Sat Oct 12 07:06:39 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3e668c6d02ed637620bde27c66c0bdeedf18f54f

commit 3e668c6d02ed637620bde27c66c0bdeedf18f54f
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sun Sep 29 10:39:56 2024 +0800

    ppp: update to 2.5.1
    
    ChangeLog:
    https://github.com/ppp-project/ppp/blob/ppp-2.5.1/ChangeLog
    
    Suppressed patches:
    010-use_target_for_configure.patch [1]
    510-pptp_compile_fix.patch [2]
    520-u_int_bsd_fix.patch [3]
    
    Upstreamed patches:
    330-retain_foreign_default_routes.patch [4]
    521-remove_unused_openssl_dep.patch [5]
    
    [1] https://github.com/ppp-project/ppp/commit/e48a9b5de46b6d3a7fda98ac64de56092471ab98
    [2] Merged into "500-add-pptp-plugin.patch"
    [3] https://github.com/ppp-project/ppp/commit/797cdae57c27ed74a5ec3b4675f31f2c6cfc98ae
    [4] https://github.com/ppp-project/ppp/commit/9856f47063c01096fe6649a21be9a021e42a45fe
    [5] https://github.com/ppp-project/ppp/commit/59342ab622a96393d25d3a2f0592c8675e771295
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
    Link: https://github.com/openwrt/openwrt/pull/16605
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/network/services/ppp/Makefile              | 10 +++--
 .../ppp/patches/010-use_target_for_configure.patch | 20 ----------
 ...101-pppd-crypto-fix-build-without-openssl.patch | 45 ++++++++++++++++++++++
 ...-pid-directory-before-create-the-pid-file.patch | 27 +++++++++++++
 .../patches/103-pppd-crypto-fix-gcc-14-build.patch | 42 ++++++++++++++++++++
 .../services/ppp/patches/105-debian_demand.patch   |  4 +-
 .../services/ppp/patches/204-radius_config.patch   |  2 +-
 .../ppp/patches/205-no_exponential_timeout.patch   |  6 +--
 .../services/ppp/patches/207-lcp_mtu_max.patch     |  2 +-
 .../services/ppp/patches/208-fix_status_code.patch |  2 +-
 .../ppp/patches/310-precompile_filter.patch        | 12 +++---
 .../321-multilink_support_custom_iface_names.patch |  4 +-
 .../330-retain_foreign_default_routes.patch        | 22 -----------
 .../ppp/patches/340-populate_default_gateway.patch |  4 +-
 .../ppp/patches/400-simplify_kernel_checks.patch   | 18 ++++-----
 .../services/ppp/patches/401-no_record_file.patch  |  2 +-
 .../network/services/ppp/patches/403-no_wtmp.patch |  4 +-
 .../404-remove_obsolete_protocol_names.patch       | 16 ++++----
 .../ppp/patches/405-no_multilink_option.patch      |  2 +-
 .../services/ppp/patches/500-add-pptp-plugin.patch |  4 +-
 .../ppp/patches/510-pptp_compile_fix.patch         | 11 ------
 .../services/ppp/patches/520-u_int_bsd_fix.patch   | 10 -----
 .../patches/521-remove_unused_openssl_dep.patch    | 11 ------
 23 files changed, 161 insertions(+), 119 deletions(-)

diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile
index dff8b02d10..878c4fc481 100644
--- a/package/network/services/ppp/Makefile
+++ b/package/network/services/ppp/Makefile
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ppp
-PKG_VERSION:=2.5.0
+PKG_VERSION:=2.5.1
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/ppp-project/ppp
-PKG_SOURCE_DATE:=2023-03-18
-PKG_SOURCE_VERSION:=760ce18f82670eb81cc186fb792919339a2e2fbe
-PKG_MIRROR_HASH:=e7fe5947ce9e59d73f6d2fdec5d2e40832e656b9edad288578391f8f169b8b9b
+PKG_SOURCE_DATE:=2024-09-18
+PKG_SOURCE_VERSION:=d5aeec65752d4a9b3bb46771d0b221c4a4a6539e
+PKG_MIRROR_HASH:=b98125933d8160ff3476b053414e787e65a94948c0ecee53f6261cd403ff4b03
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=BSD-4-Clause
@@ -37,7 +37,9 @@ CONFIGURE_VARS += \
 
 CONFIGURE_ARGS += \
 	with_openssl=no \
+	with_pam=no \
 	with_pcap=no \
+	with_srp=no \
 	with_static_pcap=yes
 
 define Package/ppp/Default
diff --git a/package/network/services/ppp/patches/010-use_target_for_configure.patch b/package/network/services/ppp/patches/010-use_target_for_configure.patch
deleted file mode 100644
index ab744eeb67..0000000000
--- a/package/network/services/ppp/patches/010-use_target_for_configure.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-configure: Allow overriding uname results
-
-In a cross compile setting it makes no sense to rely on the "uname" values
-reported by the build host system. This patch allows overriding the
-"uname -r", "uname -s" and "uname -m" results with the "UNAME_R", "UNAME_S"
-and "UNAME_M" environment variables.
-
-Signed-off-by: Jo-Philipp Wich <jo at mein.io>
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -354,7 +354,7 @@ Setting up SunOS kernel module(s)"
-         fi
-     }
- 
--    release=`uname -r`
-+    release=${UNAME_R:-`uname -r`}
-     karch=`/usr/bin/isainfo -k`
-     makext="sol2"
-     archvariant=
diff --git a/package/network/services/ppp/patches/101-pppd-crypto-fix-build-without-openssl.patch b/package/network/services/ppp/patches/101-pppd-crypto-fix-build-without-openssl.patch
new file mode 100644
index 0000000000..eb243694ec
--- /dev/null
+++ b/package/network/services/ppp/patches/101-pppd-crypto-fix-build-without-openssl.patch
@@ -0,0 +1,45 @@
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Fri, 4 Oct 2024 12:19:42 +0000
+Subject: [PATCH] pppd/crypto: fix build without openssl
+
+Compile openssl relevant code only when PPP_WITH_OPENSSL is defined.
+
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+---
+ pppd/crypto.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/pppd/crypto.c
++++ b/pppd/crypto.c
+@@ -199,6 +199,7 @@ int PPP_crypto_init()
+ {
+     int retval = 0;
+ 
++#ifdef PPP_WITH_OPENSSL
+ #if OPENSSL_VERSION_NUMBER >= 0x30000000L
+     g_crypto_ctx.legacy = OSSL_PROVIDER_load(NULL, "legacy");
+     if (g_crypto_ctx.legacy == NULL)
+@@ -214,6 +215,7 @@ int PPP_crypto_init()
+         goto done;
+     }
+ #endif
++#endif
+ 
+     retval = 1;
+ 
+@@ -224,6 +226,7 @@ done:
+ 
+ int PPP_crypto_deinit()
+ {
++#ifdef PPP_WITH_OPENSSL
+ #if OPENSSL_VERSION_NUMBER >= 0x30000000L
+     if (g_crypto_ctx.legacy) {
+         OSSL_PROVIDER_unload(g_crypto_ctx.legacy);
+@@ -239,6 +242,7 @@ int PPP_crypto_deinit()
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
+     ERR_free_strings();
+ #endif
++#endif
+     return 1;
+ }
+ 
diff --git a/package/network/services/ppp/patches/102-pppd-make-pid-directory-before-create-the-pid-file.patch b/package/network/services/ppp/patches/102-pppd-make-pid-directory-before-create-the-pid-file.patch
new file mode 100644
index 0000000000..69e68cdff4
--- /dev/null
+++ b/package/network/services/ppp/patches/102-pppd-make-pid-directory-before-create-the-pid-file.patch
@@ -0,0 +1,27 @@
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Fri, 4 Oct 2024 14:02:14 +0000
+Subject: [PATCH] pppd: make pid directory before create the pid file
+
+If multilink feature is not enabled, the '/var/run/pppd' directory
+won't be created before adding pid file.
+
+Fixes error message:
+'Failed to create pid file /var/run/pppd/pppoe-wan.pid: No such file or directory'
+
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+---
+ pppd/main.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/pppd/main.c
++++ b/pppd/main.c
+@@ -921,6 +921,9 @@ create_pidfile(int pid)
+ {
+     FILE *pidfile;
+ 
++#ifndef PPP_WITH_TDB
++    mkdir_recursive(PPP_PATH_VARRUN);
++#endif
+     slprintf(pidfilename, sizeof(pidfilename), "%s/%s.pid",
+ 	     PPP_PATH_VARRUN, ifname);
+     if ((pidfile = fopen(pidfilename, "w")) != NULL) {
diff --git a/package/network/services/ppp/patches/103-pppd-crypto-fix-gcc-14-build.patch b/package/network/services/ppp/patches/103-pppd-crypto-fix-gcc-14-build.patch
new file mode 100644
index 0000000000..3a76deb042
--- /dev/null
+++ b/package/network/services/ppp/patches/103-pppd-crypto-fix-gcc-14-build.patch
@@ -0,0 +1,42 @@
+From: Tan Zien <nabsdh9 at gmail.com>
+Date: Tue, 1 Oct 2024 10:38:45 +0800
+Subject: [PATCH] pppd/crypto: fix gcc 14 build
+
+fix this:
+
+crypto.c: In function 'PPP_crypto_error':
+crypto.c:178:11: error: implicit declaration of function 'vsnprintf' [-Wimplicit-function-declaration]
+  178 |     off = vsnprintf(buf, len, fmt, args);
+      |           ^~~~~~~~~
+crypto.c:41:1: note: include '<stdio.h>' or provide a declaration of 'vsnprintf'
+   40 | #include "crypto-priv.h"
+  +++ |+#include <stdio.h>
+   41 |
+crypto.c:178:26: warning: 'vsnprintf' argument 2 type is 'int' where 'long unsigned int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
+  178 |     off = vsnprintf(buf, len, fmt, args);
+      |                          ^~~
+<built-in>: note: built-in 'vsnprintf' declared here
+
+Signed-off-by: Tan Zien <nabsdh9 at gmail.com>
+---
+ pppd/crypto.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/pppd/crypto.c
++++ b/pppd/crypto.c
+@@ -34,6 +34,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
++#include <stdio.h>
+ 
+ #include "pppd.h"
+ #include "crypto.h"
+@@ -247,7 +248,6 @@ int PPP_crypto_deinit()
+ }
+ 
+ #ifdef UNIT_TEST
+-#include <stdio.h>
+ 
+ int debug;
+ int error_count;
diff --git a/package/network/services/ppp/patches/105-debian_demand.patch b/package/network/services/ppp/patches/105-debian_demand.patch
index bccfb85ee7..10ce13b253 100644
--- a/package/network/services/ppp/patches/105-debian_demand.patch
+++ b/package/network/services/ppp/patches/105-debian_demand.patch
@@ -137,7 +137,7 @@
  	} else {
 --- a/pppd/ipcp.c
 +++ b/pppd/ipcp.c
-@@ -1911,7 +1911,7 @@ ipcp_up(fsm *f)
+@@ -1915,7 +1915,7 @@ ipcp_up(fsm *f)
  		    proxy_arp_set[f->unit] = 1;
  
  	}
@@ -159,7 +159,7 @@
      } else {
 --- a/pppd/pppd-private.h
 +++ b/pppd/pppd-private.h
-@@ -362,7 +362,7 @@ void demand_conf(void);	/* config interf
+@@ -368,7 +368,7 @@ void demand_conf(void);	/* config interf
  void demand_block(void);	/* set all NPs to queue up packets */
  void demand_unblock(void); /* set all NPs to pass packets */
  void demand_discard(void); /* set all NPs to discard packets */
diff --git a/package/network/services/ppp/patches/204-radius_config.patch b/package/network/services/ppp/patches/204-radius_config.patch
index 5ea9d718b7..3f6db59b71 100644
--- a/package/network/services/ppp/patches/204-radius_config.patch
+++ b/package/network/services/ppp/patches/204-radius_config.patch
@@ -1,6 +1,6 @@
 --- a/pppd/plugins/radius/config.c
 +++ b/pppd/plugins/radius/config.c
-@@ -377,31 +377,37 @@ static int test_config(char *filename)
+@@ -381,31 +381,37 @@ static int test_config(char *filename)
  	}
  #endif
  
diff --git a/package/network/services/ppp/patches/205-no_exponential_timeout.patch b/package/network/services/ppp/patches/205-no_exponential_timeout.patch
index 7ba78925e2..c238c746ab 100644
--- a/package/network/services/ppp/patches/205-no_exponential_timeout.patch
+++ b/package/network/services/ppp/patches/205-no_exponential_timeout.patch
@@ -7,9 +7,9 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
 
 --- a/pppd/plugins/pppoe/discovery.c
 +++ b/pppd/plugins/pppoe/discovery.c
-@@ -685,7 +685,9 @@ discovery1(PPPoEConnection *conn)
+@@ -689,7 +689,9 @@ discovery1(PPPoEConnection *conn, int wa
  	conn->discoveryState = STATE_SENT_PADI;
- 	waitForPADO(conn, timeout);
+ 	waitForPADO(conn, timeout, waitWholeTimeoutForPADO);
  
 +#if 0
  	timeout *= 2;
@@ -17,7 +17,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      } while (conn->discoveryState == STATE_SENT_PADI);
  }
  
-@@ -715,7 +717,9 @@ discovery2(PPPoEConnection *conn)
+@@ -719,7 +721,9 @@ discovery2(PPPoEConnection *conn)
  	sendPADR(conn);
  	conn->discoveryState = STATE_SENT_PADR;
  	waitForPADS(conn, timeout);
diff --git a/package/network/services/ppp/patches/207-lcp_mtu_max.patch b/package/network/services/ppp/patches/207-lcp_mtu_max.patch
index 67761e3866..3ca0534f36 100644
--- a/package/network/services/ppp/patches/207-lcp_mtu_max.patch
+++ b/package/network/services/ppp/patches/207-lcp_mtu_max.patch
@@ -8,7 +8,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
 
 --- a/pppd/lcp.c
 +++ b/pppd/lcp.c
-@@ -1868,12 +1868,12 @@ lcp_up(fsm *f)
+@@ -1888,12 +1888,12 @@ lcp_up(fsm *f)
       * the interface MTU is set to the lowest of that, the
       * MTU we want to use, and our link MRU.
       */
diff --git a/package/network/services/ppp/patches/208-fix_status_code.patch b/package/network/services/ppp/patches/208-fix_status_code.patch
index 5b0e3a94e2..10cd945374 100644
--- a/package/network/services/ppp/patches/208-fix_status_code.patch
+++ b/package/network/services/ppp/patches/208-fix_status_code.patch
@@ -12,7 +12,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
 
 --- a/pppd/main.c
 +++ b/pppd/main.c
-@@ -1116,7 +1116,8 @@ get_input(void)
+@@ -1152,7 +1152,8 @@ get_input(void)
  	}
  	notice("Modem hangup");
  	hungup = 1;
diff --git a/package/network/services/ppp/patches/310-precompile_filter.patch b/package/network/services/ppp/patches/310-precompile_filter.patch
index a3dfe3c136..ad0dd03de8 100644
--- a/package/network/services/ppp/patches/310-precompile_filter.patch
+++ b/package/network/services/ppp/patches/310-precompile_filter.patch
@@ -13,7 +13,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
 
 --- a/configure.ac
 +++ b/configure.ac
-@@ -296,6 +296,9 @@ AM_CONDITIONAL(PPP_WITH_PAM, test "x${wi
+@@ -306,6 +306,9 @@ AM_CONDITIONAL(PPP_WITH_PAM, test "x${wi
  # With libpcap support, activate pppd on network activity
  AX_CHECK_PCAP
  
@@ -23,7 +23,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
  #
  # SunOS provides a version of libpcap that would work, but SunOS has no support for activity filter
  AM_CONDITIONAL([PPP_WITH_FILTER], [ test "x${with_pcap}" = "xyes" && test "x${build_sunos}" != "xyes" ])
-@@ -417,6 +420,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION
+@@ -359,6 +362,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION
      With libatm..........: ${with_atm:-no}
      With libpam..........: ${with_pam:-no}
      With libpcap.........: ${with_pcap:-no}
@@ -33,7 +33,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      Linker...............: $LD $LDFLAGS $LIBS
 --- a/pppd/Makefile.am
 +++ b/pppd/Makefile.am
-@@ -128,6 +128,12 @@ pppd_LDFLAGS += $(PCAP_LDFLAGS)
+@@ -138,6 +138,12 @@ pppd_LDFLAGS += $(PCAP_LDFLAGS)
  pppd_LIBS += $(PCAP_LIBS)
  endif
  
@@ -56,7 +56,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
  /*
   * There have been 3 or 4 different names for this in libpcap CVS, but
   * this seems to be what they have settled on...
-@@ -178,6 +179,13 @@ static int setlogfile(char **);
+@@ -182,6 +183,13 @@ static int setlogfile(char **);
  static int loadplugin(char **);
  #endif
  
@@ -70,7 +70,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
  #ifdef PPP_WITH_FILTER
  static int setpassfilter(char **);
  static int setactivefilter(char **);
-@@ -374,6 +382,14 @@ struct option general_options[] = {
+@@ -391,6 +399,14 @@ struct option general_options[] = {
        "set filter for active pkts", OPT_PRIO },
  #endif
  
@@ -85,7 +85,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      { "maxoctets", o_int, &maxoctets,
        "Set connection traffic limit",
        OPT_PRIO | OPT_LLIMIT | OPT_NOINCR | OPT_ZEROINF },
-@@ -1648,6 +1664,27 @@ callfile(char **argv)
+@@ -1666,6 +1682,27 @@ callfile(char **argv)
      return ok;
  }
  
diff --git a/package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch b/package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch
index cecf235c37..a761ca650d 100644
--- a/package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch
+++ b/package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch
@@ -119,7 +119,7 @@ Signed-off-by: George Kashperko <george at znau.edu.ua>
  			&& memcmp(vd.dptr, key.dptr, vd.dsize) == 0;
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -994,6 +994,16 @@ void cfg_bundle(int mrru, int mtru, int
+@@ -984,6 +984,16 @@ void cfg_bundle(int mrru, int mtru, int
  	add_fd(ppp_dev_fd);
  }
  
@@ -136,7 +136,7 @@ Signed-off-by: George Kashperko <george at znau.edu.ua>
  /*
   * make_new_bundle - create a new PPP unit (i.e. a bundle)
   * and connect our channel to it.  This should only get called
-@@ -1012,6 +1022,8 @@ void make_new_bundle(int mrru, int mtru,
+@@ -1002,6 +1012,8 @@ void make_new_bundle(int mrru, int mtru,
  
  	/* set the mrru and flags */
  	cfg_bundle(mrru, mtru, rssn, tssn);
diff --git a/package/network/services/ppp/patches/330-retain_foreign_default_routes.patch b/package/network/services/ppp/patches/330-retain_foreign_default_routes.patch
deleted file mode 100644
index c6cbc2c36a..0000000000
--- a/package/network/services/ppp/patches/330-retain_foreign_default_routes.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-pppd: Retain foreign default routes on Linux
-
-On Linux, when pppd attempts to delete its default route it does not fill
-the rt_dev field of the struct rtentry used to match the system default route.
-As a consequence, pppd happily deletes any default route even if it belongs
-to another interface.
-
-This patch makes pppd fill out the rt_dev field so that only own default
-routes are ever matched.
-
-Signed-off-by: Jo-Philipp Wich <jo at mein.io>
-
---- a/pppd/sys-linux.c
-+++ b/pppd/sys-linux.c
-@@ -2293,6 +2293,7 @@ int cifdefaultroute (int unit, u_int32_t
- 	SIN_ADDR(rt.rt_genmask) = 0L;
-     }
- 
-+    rt.rt_dev = ifname;
-     rt.rt_flags = RTF_UP;
-     if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) {
- 	if (still_ppp()) {
diff --git a/package/network/services/ppp/patches/340-populate_default_gateway.patch b/package/network/services/ppp/patches/340-populate_default_gateway.patch
index 2dcf8acc0c..f327971346 100644
--- a/package/network/services/ppp/patches/340-populate_default_gateway.patch
+++ b/package/network/services/ppp/patches/340-populate_default_gateway.patch
@@ -13,7 +13,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
 
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -2243,6 +2243,9 @@ int sifdefaultroute (int unit, u_int32_t
+@@ -2251,6 +2251,9 @@ int sifdefaultroute (int unit, u_int32_t
      memset (&rt, 0, sizeof (rt));
      SET_SA_FAMILY (rt.rt_dst, AF_INET);
  
@@ -23,7 +23,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      rt.rt_dev = ifname;
      rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */
  
-@@ -2251,7 +2254,7 @@ int sifdefaultroute (int unit, u_int32_t
+@@ -2259,7 +2262,7 @@ int sifdefaultroute (int unit, u_int32_t
  	SIN_ADDR(rt.rt_genmask) = 0L;
      }
  
diff --git a/package/network/services/ppp/patches/400-simplify_kernel_checks.patch b/package/network/services/ppp/patches/400-simplify_kernel_checks.patch
index f446341383..137937c244 100644
--- a/package/network/services/ppp/patches/400-simplify_kernel_checks.patch
+++ b/package/network/services/ppp/patches/400-simplify_kernel_checks.patch
@@ -10,7 +10,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
 
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -241,7 +241,7 @@ static int driver_is_old       = 0;
+@@ -231,7 +231,7 @@ static int driver_is_old       = 0;
  static int restore_term        = 0;	/* 1 => we've munged the terminal */
  static struct termios inittermios;	/* Initial TTY termios */
  
@@ -19,7 +19,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
  
  static char loop_name[20];
  static unsigned char inbuf[512]; /* buffer for chars read from loopback */
-@@ -260,8 +260,8 @@ static int	looped;			/* 1 if using loop
+@@ -250,8 +250,8 @@ static int	looped;			/* 1 if using loop
  static int	link_mtu;		/* mtu for the link (not bundle) */
  
  static struct utsname utsname;	/* for the kernel version */
@@ -29,7 +29,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
  
  #define MAX_IFS		100
  
-@@ -1978,11 +1978,12 @@ int ccp_fatal_error (int unit)
+@@ -1970,11 +1970,12 @@ int ccp_fatal_error (int unit)
   *
   * path_to_procfs - find the path to the proc file system mount point
   */
@@ -44,7 +44,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      struct mntent *mntent;
      FILE *fp;
  
-@@ -2004,6 +2005,7 @@ static char *path_to_procfs(const char *
+@@ -1996,6 +1997,7 @@ static char *path_to_procfs(const char *
  	    fclose (fp);
  	}
      }
@@ -52,7 +52,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
  
      strlcpy(proc_path + proc_path_len, tail,
  	    sizeof(proc_path) - proc_path_len);
-@@ -2888,15 +2890,19 @@ int ppp_check_kernel_support(void)
+@@ -2895,15 +2897,19 @@ int ppp_check_kernel_support(void)
      int    my_version, my_modification, my_patch;
      int osmaj, osmin, ospatch;
  
@@ -72,7 +72,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
  
  	/* XXX should get from driver */
  	driver_version = 2;
-@@ -2956,6 +2962,7 @@ int ppp_check_kernel_support(void)
+@@ -2963,6 +2969,7 @@ int ppp_check_kernel_support(void)
  
      if (ok && ((ifr.ifr_hwaddr.sa_family & ~0xFF) != ARPHRD_PPP))
  	ok = 0;
@@ -80,7 +80,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
  
  /*
   *  This is the PPP device. Validate the version of the driver at this
-@@ -3570,6 +3577,7 @@ get_pty(int *master_fdp, int *slave_fdp,
+@@ -3577,6 +3584,7 @@ get_pty(int *master_fdp, int *slave_fdp,
      }
  #endif /* TIOCGPTN */
  
@@ -88,7 +88,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      if (sfd < 0) {
  	/* the old way - scan through the pty name space */
  	for (i = 0; i < 64; ++i) {
-@@ -3594,6 +3602,7 @@ get_pty(int *master_fdp, int *slave_fdp,
+@@ -3601,6 +3609,7 @@ get_pty(int *master_fdp, int *slave_fdp,
  	    }
  	}
      }
@@ -125,7 +125,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
  char *pppd_pppoe_service = NULL;
  static char *acName = NULL;
  static char *existingSession = NULL;
-@@ -416,10 +413,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
+@@ -421,10 +418,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
  void
  plugin_init(void)
  {
diff --git a/package/network/services/ppp/patches/401-no_record_file.patch b/package/network/services/ppp/patches/401-no_record_file.patch
index 465e332b21..5ef1a178d7 100644
--- a/package/network/services/ppp/patches/401-no_record_file.patch
+++ b/package/network/services/ppp/patches/401-no_record_file.patch
@@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
 
 --- a/pppd/pppd-private.h
 +++ b/pppd/pppd-private.h
-@@ -185,7 +185,6 @@ extern int	holdoff;	/* Dead time before
+@@ -187,7 +187,6 @@ extern int	holdoff;	/* Dead time before
  extern bool	holdoff_specified; /* true if user gave a holdoff value */
  extern bool	notty;		/* Stdin/out is not a tty */
  extern char	*pty_socket;	/* Socket to connect to pty */
diff --git a/package/network/services/ppp/patches/403-no_wtmp.patch b/package/network/services/ppp/patches/403-no_wtmp.patch
index 9a25e43415..39d105ff57 100644
--- a/package/network/services/ppp/patches/403-no_wtmp.patch
+++ b/package/network/services/ppp/patches/403-no_wtmp.patch
@@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
 
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -3026,6 +3026,7 @@ int ppp_check_kernel_support(void)
+@@ -3033,6 +3033,7 @@ int ppp_check_kernel_support(void)
  
  void logwtmp (const char *line, const char *name, const char *host)
  {
@@ -15,7 +15,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      struct utmp ut, *utp;
      pid_t  mypid = getpid();
  #if __GLIBC__ < 2
-@@ -3091,6 +3092,7 @@ void logwtmp (const char *line, const ch
+@@ -3098,6 +3099,7 @@ void logwtmp (const char *line, const ch
  	close (wtmp);
      }
  #endif
diff --git a/package/network/services/ppp/patches/404-remove_obsolete_protocol_names.patch b/package/network/services/ppp/patches/404-remove_obsolete_protocol_names.patch
index 9f691217ac..6b2d15ed25 100644
--- a/package/network/services/ppp/patches/404-remove_obsolete_protocol_names.patch
+++ b/package/network/services/ppp/patches/404-remove_obsolete_protocol_names.patch
@@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
 
 --- a/pppd/main.c
 +++ b/pppd/main.c
-@@ -948,14 +948,17 @@ struct protocol_list {
+@@ -984,14 +984,17 @@ struct protocol_list {
      const char	*name;
  } protocol_list[] = {
      { 0x21,	"IP" },
@@ -25,7 +25,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      { 0x33,	"Stream Protocol ST-II" },
      { 0x35,	"Banyan Vines" },
      { 0x39,	"AppleTalk EDDP" },
-@@ -969,8 +972,11 @@ struct protocol_list {
+@@ -1005,8 +1008,11 @@ struct protocol_list {
      { 0x49,	"Serial Data Transport Protocol (PPP-SDTP)" },
      { 0x4b,	"SNA over 802.2" },
      { 0x4d,	"SNA" },
@@ -37,7 +37,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      { 0x53,	"Encryption" },
      { 0x55,	"Individual Link Encryption" },
      { 0x57,	"IPv6" },
-@@ -981,12 +987,15 @@ struct protocol_list {
+@@ -1017,12 +1023,15 @@ struct protocol_list {
      { 0x65,	"RTP IPHC Compressed non-TCP" },
      { 0x67,	"RTP IPHC Compressed UDP 8" },
      { 0x69,	"RTP IPHC Compressed RTP 8" },
@@ -53,7 +53,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      { 0x0203,	"IBM Source Routing BPDU" },
      { 0x0205,	"DEC LANBridge100 Spanning Tree" },
      { 0x0207,	"Cisco Discovery Protocol" },
-@@ -998,15 +1007,19 @@ struct protocol_list {
+@@ -1034,15 +1043,19 @@ struct protocol_list {
      { 0x0231,	"Luxcom" },
      { 0x0233,	"Sigma Network Systems" },
      { 0x0235,	"Apple Client Server Protocol" },
@@ -73,7 +73,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      { 0x4001,	"Cray Communications Control Protocol" },
      { 0x4003,	"CDPD Mobile Network Registration Protocol" },
      { 0x4005,	"Expand accelerator protocol" },
-@@ -1017,8 +1030,10 @@ struct protocol_list {
+@@ -1053,8 +1066,10 @@ struct protocol_list {
      { 0x4023,	"RefTek Protocol" },
      { 0x4025,	"Fibre Channel" },
      { 0x4027,	"EMIT Protocols" },
@@ -84,7 +84,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      { 0x8023,	"OSI Network Layer Control Protocol" },
      { 0x8025,	"Xerox NS IDP Control Protocol" },
      { 0x8027,	"DECnet Phase IV Control Protocol" },
-@@ -1027,7 +1042,9 @@ struct protocol_list {
+@@ -1063,7 +1078,9 @@ struct protocol_list {
      { 0x8031,	"Bridging NCP" },
      { 0x8033,	"Stream Protocol Control Protocol" },
      { 0x8035,	"Banyan Vines Control Protocol" },
@@ -94,7 +94,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      { 0x803f,	"NETBIOS Framing Control Protocol" },
      { 0x8041,	"Cisco Systems Control Protocol" },
      { 0x8043,	"Ascom Timeplex" },
-@@ -1036,18 +1053,24 @@ struct protocol_list {
+@@ -1072,18 +1089,24 @@ struct protocol_list {
      { 0x8049,	"Serial Data Control Protocol (PPP-SDCP)" },
      { 0x804b,	"SNA over 802.2 Control Protocol" },
      { 0x804d,	"SNA Control Protocol" },
@@ -119,7 +119,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
      { 0x8207,	"Cisco Discovery Protocol Control" },
      { 0x8209,	"Netcs Twin Routing" },
      { 0x820b,	"STP - Control Protocol" },
-@@ -1056,24 +1079,29 @@ struct protocol_list {
+@@ -1092,24 +1115,29 @@ struct protocol_list {
      { 0x8281,	"MPLSCP" },
      { 0x8285,	"IEEE p1284.4 standard - Protocol Control" },
      { 0x8287,	"ETSI TETRA TNP1 Control Protocol" },
diff --git a/package/network/services/ppp/patches/405-no_multilink_option.patch b/package/network/services/ppp/patches/405-no_multilink_option.patch
index d7dbc9a02c..654bebd569 100644
--- a/package/network/services/ppp/patches/405-no_multilink_option.patch
+++ b/package/network/services/ppp/patches/405-no_multilink_option.patch
@@ -9,7 +9,7 @@ Signed-off-by: Jo-Philipp Wich <jo at mein.io>
 
 --- a/pppd/options.c
 +++ b/pppd/options.c
-@@ -362,13 +362,14 @@ struct option general_options[] = {
+@@ -379,13 +379,14 @@ struct option general_options[] = {
        "Enable multilink operation", OPT_PRIOSUB | OPT_ALIAS | 1 },
      { "nomultilink", o_bool, &multilink,
        "Disable multilink operation", OPT_PRIOSUB | 0 },
diff --git a/package/network/services/ppp/patches/500-add-pptp-plugin.patch b/package/network/services/ppp/patches/500-add-pptp-plugin.patch
index c4b0dd1be9..4b66cd2165 100644
--- a/package/network/services/ppp/patches/500-add-pptp-plugin.patch
+++ b/package/network/services/ppp/patches/500-add-pptp-plugin.patch
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -336,6 +336,7 @@ AC_CONFIG_FILES([
+@@ -344,6 +344,7 @@ AC_CONFIG_FILES([
      pppd/plugins/pppoatm/Makefile
      pppd/plugins/pppol2tp/Makefile
      pppd/plugins/radius/Makefile
@@ -371,7 +371,7 @@
 +
 +#include "pptp_callmgr.h"
 +#include <net/if.h>
-+#include <net/ethernet.h>
++#include <linux/if_ether.h>
 +#include <linux/if_pppox.h>
 +
 +#include <stdio.h>
diff --git a/package/network/services/ppp/patches/510-pptp_compile_fix.patch b/package/network/services/ppp/patches/510-pptp_compile_fix.patch
deleted file mode 100644
index ba9e31b762..0000000000
--- a/package/network/services/ppp/patches/510-pptp_compile_fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/pppd/plugins/pptp/pptp.c
-+++ b/pppd/plugins/pptp/pptp.c
-@@ -50,7 +50,7 @@
- 
- #include "pptp_callmgr.h"
- #include <net/if.h>
--#include <net/ethernet.h>
-+#include <linux/if_ether.h>
- #include <linux/if_pppox.h>
- 
- #include <stdio.h>
diff --git a/package/network/services/ppp/patches/520-u_int_bsd_fix.patch b/package/network/services/ppp/patches/520-u_int_bsd_fix.patch
deleted file mode 100644
index deecb7201c..0000000000
--- a/package/network/services/ppp/patches/520-u_int_bsd_fix.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/pppd/ppp-sha1.c
-+++ b/pppd/ppp-sha1.c
-@@ -107,6 +107,7 @@ static void sha1_clean(PPP_MD_CTX *ctx)
-  */
- 
- #include <string.h>
-+#include <sys/types.h>
- #include <netinet/in.h>	/* htonl() */
- 
- typedef struct {
diff --git a/package/network/services/ppp/patches/521-remove_unused_openssl_dep.patch b/package/network/services/ppp/patches/521-remove_unused_openssl_dep.patch
deleted file mode 100644
index e5bceb699d..0000000000
--- a/package/network/services/ppp/patches/521-remove_unused_openssl_dep.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/pppd/crypto_ms.c
-+++ b/pppd/crypto_ms.c
-@@ -122,8 +122,6 @@ MakeKey(const unsigned char *key, unsign
- 	DES_set_odd_parity((DES_cblock *)des_key);
- }
- 
--#include <openssl/evp.h>
--
- int
- DesEncrypt(const unsigned char *clear, const unsigned char *key, unsigned char *cipher)
- {




More information about the lede-commits mailing list