Browse Source

pppd: update to 2.4.8

78cd384 Update README and patchlevel.h for 2.4.8 release
5d03403 pppd: Avoid use of strnlen (and strlen) in vslprintf
a1e950a pppd: Fix IPv6 default route code for Solaris
ca5e61b plugins/rp-pppoe: Make tag parsing loop condition more accurate
c10c3c7 pppd: Make sure word read from options file is null-terminated
b311e98 pppd: Limit memory accessed by string formats with max length specified
3ea9de9 pppd: Eliminate some more compiler warnings
57edb1a pppd: Include time.h header before using time_t
09f695f pppd: Don't free static string
03104ba pppd.h: Add missing headers
388597e pppd: Add defaultroute6 and related options
66ce4ba pppd: Avoid declarations within statements in main.c
5637180 pppd: Fix `ifname` option in case of multilink (#105)
d00f8a0 pppd: Fix variable reference syntax in Makefile.linux
b6b4d28 pppd: Check tdb pointer before closing

Signed-off-by: DENG Qingfang <[email protected]>
DENG Qingfang 5 years ago
parent
commit
983605e61f
21 changed files with 67 additions and 68 deletions
  1. 5 6
      package/network/services/ppp/Makefile
  2. 1 1
      package/network/services/ppp/patches/100-debian_ip-ip_option.patch
  3. 1 1
      package/network/services/ppp/patches/101-debian_close_dev_ppp.patch
  4. 1 1
      package/network/services/ppp/patches/103-debian_fix_link_pidfile.patch
  5. 4 4
      package/network/services/ppp/patches/105-debian_demand.patch
  6. 13 13
      package/network/services/ppp/patches/110-debian_defaultroute.patch
  7. 4 4
      package/network/services/ppp/patches/120-debian_ipv6_updown_option.patch
  8. 1 1
      package/network/services/ppp/patches/121-debian_adaptive_lcp_echo.patch
  9. 2 2
      package/network/services/ppp/patches/133-fix_sha1_include.patch
  10. 2 2
      package/network/services/ppp/patches/200-makefile.patch
  11. 3 3
      package/network/services/ppp/patches/206-compensate_time_change.patch
  12. 1 1
      package/network/services/ppp/patches/208-fix_status_code.patch
  13. 1 1
      package/network/services/ppp/patches/310-precompile_filter.patch
  14. 4 4
      package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch
  15. 1 1
      package/network/services/ppp/patches/330-retain_foreign_default_routes.patch
  16. 2 2
      package/network/services/ppp/patches/340-populate_default_gateway.patch
  17. 9 9
      package/network/services/ppp/patches/400-simplify_kernel_checks.patch
  18. 1 1
      package/network/services/ppp/patches/401-no_record_file.patch
  19. 2 2
      package/network/services/ppp/patches/403-no_wtmp.patch
  20. 8 8
      package/network/services/ppp/patches/404-remove_obsolete_protocol_names.patch
  21. 1 1
      package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch

+ 5 - 6
package/network/services/ppp/Makefile

@@ -9,19 +9,18 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ppp
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/paulusmack/ppp
-PKG_SOURCE_DATE:=2019-10-04
-PKG_SOURCE_VERSION:=0d004db25edd42f6720f48eedc51f68a781278db
-PKG_MIRROR_HASH:=93f66ee06d58c447288c88ac1c17453c2b12a8af7f16ef132b31529b1955b7a2
+PKG_SOURCE_VERSION:=78cd384ce0f48bb5edb84e4fe9a574eab4a4ad14
+PKG_MIRROR_HASH:=cf284c312b0c90974d11f8aeece173bcac8475f5b810911f4feb2c5a4db263fe
 PKG_MAINTAINER:=Felix Fietkau <[email protected]>
 PKG_LICENSE:=BSD-4-Clause
 PKG_CPE_ID:=cpe:/a:samba:ppp
 
-PKG_RELEASE_VERSION:=2.4.7
-PKG_VERSION:=$(PKG_RELEASE_VERSION).git-$(PKG_SOURCE_DATE)
+PKG_RELEASE_VERSION:=2.4.8
+PKG_VERSION:=$(PKG_RELEASE_VERSION)
 
 PKG_BUILD_DEPENDS:=libpcap
 

+ 1 - 1
package/network/services/ppp/patches/100-debian_ip-ip_option.patch

@@ -85,7 +85,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
        "Enable multilink operation", OPT_PRIO | 1 },
 --- a/pppd/pppd.h
 +++ b/pppd/pppd.h
-@@ -332,6 +332,8 @@ extern int	connect_delay;	/* Time to del
+@@ -334,6 +334,8 @@ extern int	connect_delay;	/* Time to del
  extern int	max_data_rate;	/* max bytes/sec through charshunt */
  extern int	req_unit;	/* interface unit number to use */
  extern char	req_ifname[MAXIFNAMELEN]; /* interface name to use */

+ 1 - 1
package/network/services/ppp/patches/101-debian_close_dev_ppp.patch

@@ -12,7 +12,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
 
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -460,6 +460,13 @@ int generic_establish_ppp (int fd)
+@@ -467,6 +467,13 @@ int generic_establish_ppp (int fd)
      if (new_style_driver) {
  	int flags;
  

+ 1 - 1
package/network/services/ppp/patches/103-debian_fix_link_pidfile.patch

@@ -11,7 +11,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
 
 --- a/pppd/main.c
 +++ b/pppd/main.c
-@@ -776,8 +776,7 @@ detach()
+@@ -780,8 +780,7 @@ detach()
  	/* update pid files if they have been written already */
  	if (pidfilename[0])
  	    create_pidfile(pid);

+ 4 - 4
package/network/services/ppp/patches/105-debian_demand.patch

@@ -150,9 +150,9 @@
      } else {
 --- a/pppd/ipv6cp.c
 +++ b/pppd/ipv6cp.c
-@@ -1231,7 +1231,7 @@ ipv6cp_up(f)
- 	    }
- 
+@@ -1252,7 +1252,7 @@ ipv6cp_up(f)
+ 		if (sif6defaultroute(f->unit, go->ourid, ho->hisid))
+ 		    default_route_set[f->unit] = 1;
  	}
 -	demand_rexmit(PPP_IPV6);
 +	demand_rexmit(PPP_IPV6,0);
@@ -161,7 +161,7 @@
      } else {
 --- a/pppd/pppd.h
 +++ b/pppd/pppd.h
-@@ -599,7 +599,7 @@ void demand_conf __P((void));	/* config
+@@ -601,7 +601,7 @@ void demand_conf __P((void));	/* config
  void demand_block __P((void));	/* set all NPs to queue up packets */
  void demand_unblock __P((void)); /* set all NPs to pass packets */
  void demand_discard __P((void)); /* set all NPs to discard packets */

+ 13 - 13
package/network/services/ppp/patches/110-debian_defaultroute.patch

@@ -125,9 +125,9 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      bool old_vj;		/* use old (short) form of VJ option? */
 --- a/pppd/pppd.8
 +++ b/pppd/pppd.8
-@@ -127,6 +127,11 @@ is no other default route with the same
- value of -1, the route is only added if there is no default route at
- all.
+@@ -133,6 +133,11 @@ the gateway, when IPv6CP negotiation is
+ This entry is removed when the PPP connection is broken.  This option
+ is privileged if the \fInodefaultroute6\fR option has been specified.
  .TP
 +.B replacedefaultroute
 +This option is a flag to the defaultroute option. If defaultroute is
@@ -137,7 +137,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  .B disconnect \fIscript
  Execute the command specified by \fIscript\fR, by passing it to a
  shell, after
-@@ -740,7 +745,12 @@ disable both forms of hardware flow cont
+@@ -746,7 +751,12 @@ disable both forms of hardware flow cont
  .TP
  .B nodefaultroute
  Disable the \fIdefaultroute\fR option.  The system administrator who
@@ -150,10 +150,10 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
 +wishes to prevent users from replacing a default route with pppd
  can do so by placing this option in the /etc/ppp/options file.
  .TP
- .B nodeflate
+ .B nodefaultroute6
 --- a/pppd/pppd.h
 +++ b/pppd/pppd.h
-@@ -681,7 +681,7 @@ int  sif6addr __P((int, eui64_t, eui64_t
+@@ -683,7 +683,7 @@ int  sif6addr __P((int, eui64_t, eui64_t
  int  cif6addr __P((int, eui64_t, eui64_t));
  				/* Remove an IPv6 address from i/f */
  #endif
@@ -164,16 +164,16 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  				/* Delete default route through i/f */
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -207,6 +207,8 @@ static unsigned char inbuf[512]; /* buff
- static int	if_is_up;	/* Interface has been marked up */
+@@ -209,6 +209,8 @@ static int	if_is_up;	/* Interface has be
  static int	if6_is_up;	/* Interface has been marked up for IPv6, to help differentiate */
  static int	have_default_route;	/* Gateway for default route added */
+ static int	have_default_route6;	/* Gateway for default IPv6 route added */
 +static struct	rtentry old_def_rt;	/* Old default route */
 +static int	default_rt_repl_rest;	/* replace and restore old default rt */
  static u_int32_t proxy_arp_addr;	/* Addr for proxy arp entry added */
  static char proxy_arp_dev[16];		/* Device for proxy arp entry */
  static u_int32_t our_old_addr;		/* for detecting address changes */
-@@ -1570,6 +1572,9 @@ static int read_route_table(struct rtent
+@@ -1577,6 +1579,9 @@ static int read_route_table(struct rtent
  	p = NULL;
      }
  
@@ -183,7 +183,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
      SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
      SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
-@@ -1642,20 +1647,52 @@ int have_route_to(u_int32_t addr)
+@@ -1649,20 +1654,52 @@ int have_route_to(u_int32_t addr)
  /********************************************************************
   *
   * sifdefaultroute - assign a default route through the address given.
@@ -249,7 +249,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      }
  
      memset (&rt, 0, sizeof (rt));
-@@ -1671,10 +1708,16 @@ int sifdefaultroute (int unit, u_int32_t
+@@ -1678,10 +1715,16 @@ int sifdefaultroute (int unit, u_int32_t
  
      rt.rt_flags = RTF_UP;
      if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) {
@@ -267,7 +267,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  
      have_default_route = 1;
      return 1;
-@@ -1708,11 +1751,21 @@ int cifdefaultroute (int unit, u_int32_t
+@@ -1715,11 +1758,21 @@ int cifdefaultroute (int unit, u_int32_t
      rt.rt_flags = RTF_UP;
      if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) {
  	if (still_ppp()) {
@@ -292,7 +292,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  }
 --- a/pppd/sys-solaris.c
 +++ b/pppd/sys-solaris.c
-@@ -2038,12 +2038,18 @@ cifaddr(u, o, h)
+@@ -2119,12 +2119,18 @@ cifaddr(u, o, h)
   * sifdefaultroute - assign a default route through the address given.
   */
  int

+ 4 - 4
package/network/services/ppp/patches/120-debian_ipv6_updown_option.patch

@@ -48,7 +48,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
        "Enable multilink operation", OPT_PRIO | 1 },
 --- a/pppd/ipv6cp.c
 +++ b/pppd/ipv6cp.c
-@@ -1268,7 +1268,7 @@ ipv6cp_up(f)
+@@ -1294,7 +1294,7 @@ ipv6cp_up(f)
       */
      if (ipv6cp_script_state == s_down && ipv6cp_script_pid == 0) {
  	ipv6cp_script_state = s_up;
@@ -57,7 +57,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      }
  }
  
-@@ -1320,7 +1320,7 @@ ipv6cp_down(f)
+@@ -1346,7 +1346,7 @@ ipv6cp_down(f)
      /* Execute the ipv6-down script */
      if (ipv6cp_script_state == s_up && ipv6cp_script_pid == 0) {
  	ipv6cp_script_state = s_down;
@@ -66,7 +66,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      }
  }
  
-@@ -1363,13 +1363,13 @@ ipv6cp_script_done(arg)
+@@ -1389,13 +1389,13 @@ ipv6cp_script_done(arg)
      case s_up:
  	if (ipv6cp_fsm[0].state != OPENED) {
  	    ipv6cp_script_state = s_down;
@@ -84,7 +84,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      }
 --- a/pppd/pppd.h
 +++ b/pppd/pppd.h
-@@ -334,6 +334,8 @@ extern int	req_unit;	/* interface unit n
+@@ -336,6 +336,8 @@ extern int	req_unit;	/* interface unit n
  extern char	req_ifname[MAXIFNAMELEN]; /* interface name to use */
  extern char	path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
  extern char	path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */

+ 1 - 1
package/network/services/ppp/patches/121-debian_adaptive_lcp_echo.patch

@@ -42,7 +42,7 @@
       */
 --- a/pppd/pppd.8
 +++ b/pppd/pppd.8
-@@ -569,6 +569,11 @@ to 1) if the \fIproxyarp\fR option is us
+@@ -575,6 +575,11 @@ to 1) if the \fIproxyarp\fR option is us
  dynamic IP address option (i.e. set /proc/sys/net/ipv4/ip_dynaddr to
  1) in demand mode if the local address changes.
  .TP

+ 2 - 2
package/network/services/ppp/patches/133-fix_sha1_include.patch

@@ -1,8 +1,8 @@
 --- a/pppd/sha1.c
 +++ b/pppd/sha1.c
-@@ -18,7 +18,7 @@
- 
+@@ -19,7 +19,7 @@
  #include <string.h>
+ #include <time.h>
  #include <netinet/in.h>	/* htonl() */
 -#include <net/ppp_defs.h>
 +#include "pppd.h"

+ 2 - 2
package/network/services/ppp/patches/200-makefile.patch

@@ -38,8 +38,8 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  #LIBS     += -lshadow $(LIBS)
  endif
  
--ifneq ($(wildcard $(shell $CC --print-sysroot)/usr/include/crypt.h),)
-+#ifneq ($(wildcard $(shell $CC --print-sysroot)/usr/include/crypt.h),)
+-ifneq ($(wildcard $(shell $(CC) --print-sysroot)/usr/include/crypt.h),)
++#ifneq ($(wildcard $(shell $(CC) --print-sysroot)/usr/include/crypt.h),)
  CFLAGS  += -DHAVE_CRYPT_H=1
  LIBS	+= -lcrypt
 -endif

+ 3 - 3
package/network/services/ppp/patches/206-compensate_time_change.patch

@@ -37,7 +37,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  	gettimeofday(&start_time, NULL);
  	script_unsetenv("CONNECT_TIME");
  	script_unsetenv("BYTES_SENT");
-@@ -1270,6 +1273,36 @@ struct	callout {
+@@ -1274,6 +1277,36 @@ struct	callout {
  
  static struct callout *callout = NULL;	/* Callout list */
  static struct timeval timenow;		/* Current time */
@@ -74,7 +74,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  
  /*
   * timeout - Schedule a timeout.
-@@ -1340,6 +1373,8 @@ calltimeout()
+@@ -1344,6 +1377,8 @@ calltimeout()
  {
      struct callout *p;
  
@@ -83,7 +83,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      while (callout != NULL) {
  	p = callout;
  
-@@ -1367,6 +1402,8 @@ timeleft(tvp)
+@@ -1371,6 +1406,8 @@ timeleft(tvp)
  {
      if (callout == NULL)
  	return NULL;

+ 1 - 1
package/network/services/ppp/patches/208-fix_status_code.patch

@@ -12,7 +12,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
 
 --- a/pppd/main.c
 +++ b/pppd/main.c
-@@ -1051,7 +1051,8 @@ get_input()
+@@ -1055,7 +1055,8 @@ get_input()
  	}
  	notice("Modem hangup");
  	hungup = 1;

+ 1 - 1
package/network/services/ppp/patches/310-precompile_filter.patch

@@ -77,7 +77,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  #ifdef MAXOCTETS
      { "maxoctets", o_int, &maxoctets,
        "Set connection traffic limit",
-@@ -1510,6 +1526,29 @@ callfile(argv)
+@@ -1511,6 +1527,29 @@ callfile(argv)
      return ok;
  }
  

+ 4 - 4
package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch

@@ -41,7 +41,7 @@ Signed-off-by: George Kashperko <[email protected]>
  			/* make sure the string is null-terminated */
  			rec.dptr[rec.dsize-1] = 0;
 -			/* parse the interface number */
--			parse_num(rec.dptr, "IFNAME=ppp", &unit);
+-			parse_num(rec.dptr, "UNIT=", &unit);
 +
  			/* check the pid value */
  			if (!parse_num(rec.dptr, "PPPD_PID=", &pppd_pid)
@@ -114,7 +114,7 @@ Signed-off-by: George Kashperko <[email protected]>
  	TDB_DATA kd, vd;
  	int ret = 0;
  
--	slprintf(ifkey, sizeof(ifkey), "IFNAME=ppp%d", unit);
+-	slprintf(ifkey, sizeof(ifkey), "UNIT=%d", unit);
 +	slprintf(ifkey, sizeof(ifkey), "IFNAME=%s", ifname);
 +
  	kd.dptr = ifkey;
@@ -126,7 +126,7 @@ Signed-off-by: George Kashperko <[email protected]>
  			&& memcmp(vd.dptr, key.dptr, vd.dsize) == 0;
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -693,6 +693,16 @@ void cfg_bundle(int mrru, int mtru, int
+@@ -700,6 +700,16 @@ void cfg_bundle(int mrru, int mtru, int
  	add_fd(ppp_dev_fd);
  }
  
@@ -143,7 +143,7 @@ Signed-off-by: George Kashperko <[email protected]>
  /*
   * make_new_bundle - create a new PPP unit (i.e. a bundle)
   * and connect our channel to it.  This should only get called
-@@ -711,6 +721,8 @@ void make_new_bundle(int mrru, int mtru,
+@@ -718,6 +728,8 @@ void make_new_bundle(int mrru, int mtru,
  
  	/* set the mrru and flags */
  	cfg_bundle(mrru, mtru, rssn, tssn);

+ 1 - 1
package/network/services/ppp/patches/330-retain_foreign_default_routes.patch

@@ -12,7 +12,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
 
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -1760,6 +1760,7 @@ int cifdefaultroute (int unit, u_int32_t
+@@ -1767,6 +1767,7 @@ int cifdefaultroute (int unit, u_int32_t
  	SIN_ADDR(rt.rt_genmask) = 0L;
      }
  

+ 2 - 2
package/network/services/ppp/patches/340-populate_default_gateway.patch

@@ -13,7 +13,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
 
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -1710,6 +1710,9 @@ int sifdefaultroute (int unit, u_int32_t
+@@ -1717,6 +1717,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 <[email protected]>
      rt.rt_dev = ifname;
      rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */
  
-@@ -1718,7 +1721,7 @@ int sifdefaultroute (int unit, u_int32_t
+@@ -1725,7 +1728,7 @@ int sifdefaultroute (int unit, u_int32_t
  	SIN_ADDR(rt.rt_genmask) = 0L;
      }
  

+ 9 - 9
package/network/services/ppp/patches/400-simplify_kernel_checks.patch

@@ -10,7 +10,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
 
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -199,7 +199,7 @@ static int driver_is_old       = 0;
+@@ -200,7 +200,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 <[email protected]>
  
  static char loop_name[20];
  static unsigned char inbuf[512]; /* buffer for chars read from loopback */
-@@ -217,8 +217,8 @@ static int	looped;			/* 1 if using loop
+@@ -219,8 +219,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 <[email protected]>
  
  #define MAX_IFS		100
  
-@@ -1446,11 +1446,12 @@ int ccp_fatal_error (int unit)
+@@ -1453,11 +1453,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 <[email protected]>
      struct mntent *mntent;
      FILE *fp;
  
-@@ -1472,6 +1473,7 @@ static char *path_to_procfs(const char *
+@@ -1479,6 +1480,7 @@ static char *path_to_procfs(const char *
  	    fclose (fp);
  	}
      }
@@ -52,7 +52,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  
      strlcpy(proc_path + proc_path_len, tail,
  	    sizeof(proc_path) - proc_path_len);
-@@ -2133,15 +2135,19 @@ int ppp_available(void)
+@@ -2332,15 +2334,19 @@ int ppp_available(void)
      int    my_version, my_modification, my_patch;
      int osmaj, osmin, ospatch;
  
@@ -72,7 +72,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  
  	/* XXX should get from driver */
  	driver_version = 2;
-@@ -2201,6 +2207,7 @@ int ppp_available(void)
+@@ -2400,6 +2406,7 @@ int ppp_available(void)
  
      if (ok && ((ifr.ifr_hwaddr.sa_family & ~0xFF) != ARPHRD_PPP))
  	ok = 0;
@@ -80,7 +80,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  
  /*
   *  This is the PPP device. Validate the version of the driver at this
-@@ -2737,6 +2744,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
+@@ -2936,6 +2943,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
      }
  #endif /* TIOCGPTN */
  
@@ -88,7 +88,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      if (sfd < 0) {
  	/* the old way - scan through the pty name space */
  	for (i = 0; i < 64; ++i) {
-@@ -2755,6 +2763,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
+@@ -2954,6 +2962,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
  	    }
  	}
      }
@@ -125,7 +125,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
  char *pppd_pppoe_service = NULL;
  static char *acName = NULL;
  static char *existingSession = NULL;
-@@ -392,10 +389,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
+@@ -394,10 +391,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
  void
  plugin_init(void)
  {

+ 1 - 1
package/network/services/ppp/patches/401-no_record_file.patch

@@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
 
 --- a/pppd/pppd.h
 +++ b/pppd/pppd.h
-@@ -323,7 +323,6 @@ extern int	holdoff;	/* Dead time before
+@@ -325,7 +325,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 */

+ 2 - 2
package/network/services/ppp/patches/403-no_wtmp.patch

@@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
 
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -2271,6 +2271,7 @@ int ppp_available(void)
+@@ -2470,6 +2470,7 @@ int ppp_available(void)
  
  void logwtmp (const char *line, const char *name, const char *host)
  {
@@ -15,7 +15,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      struct utmp ut, *utp;
      pid_t  mypid = getpid();
  #if __GLIBC__ < 2
-@@ -2336,6 +2337,7 @@ void logwtmp (const char *line, const ch
+@@ -2535,6 +2536,7 @@ void logwtmp (const char *line, const ch
  	close (wtmp);
      }
  #endif

+ 8 - 8
package/network/services/ppp/patches/404-remove_obsolete_protocol_names.patch

@@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
 
 --- a/pppd/main.c
 +++ b/pppd/main.c
-@@ -882,14 +882,17 @@ struct protocol_list {
+@@ -886,14 +886,17 @@ struct protocol_list {
      const char	*name;
  } protocol_list[] = {
      { 0x21,	"IP" },
@@ -25,7 +25,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      { 0x33,	"Stream Protocol ST-II" },
      { 0x35,	"Banyan Vines" },
      { 0x39,	"AppleTalk EDDP" },
-@@ -903,8 +906,11 @@ struct protocol_list {
+@@ -907,8 +910,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 <[email protected]>
      { 0x53,	"Encryption" },
      { 0x55,	"Individual Link Encryption" },
      { 0x57,	"IPv6" },
-@@ -915,12 +921,15 @@ struct protocol_list {
+@@ -919,12 +925,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 <[email protected]>
      { 0x0203,	"IBM Source Routing BPDU" },
      { 0x0205,	"DEC LANBridge100 Spanning Tree" },
      { 0x0207,	"Cisco Discovery Protocol" },
-@@ -932,15 +941,19 @@ struct protocol_list {
+@@ -936,15 +945,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 <[email protected]>
      { 0x4001,	"Cray Communications Control Protocol" },
      { 0x4003,	"CDPD Mobile Network Registration Protocol" },
      { 0x4005,	"Expand accelerator protocol" },
-@@ -951,8 +964,10 @@ struct protocol_list {
+@@ -955,8 +968,10 @@ struct protocol_list {
      { 0x4023,	"RefTek Protocol" },
      { 0x4025,	"Fibre Channel" },
      { 0x4027,	"EMIT Protocols" },
@@ -84,7 +84,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
      { 0x8023,	"OSI Network Layer Control Protocol" },
      { 0x8025,	"Xerox NS IDP Control Protocol" },
      { 0x8027,	"DECnet Phase IV Control Protocol" },
-@@ -961,7 +976,9 @@ struct protocol_list {
+@@ -965,7 +980,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 <[email protected]>
      { 0x803f,	"NETBIOS Framing Control Protocol" },
      { 0x8041,	"Cisco Systems Control Protocol" },
      { 0x8043,	"Ascom Timeplex" },
-@@ -970,18 +987,24 @@ struct protocol_list {
+@@ -974,18 +991,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 <[email protected]>
      { 0x8207,	"Cisco Discovery Protocol Control" },
      { 0x8209,	"Netcs Twin Routing" },
      { 0x820b,	"STP - Control Protocol" },
-@@ -990,24 +1013,29 @@ struct protocol_list {
+@@ -994,24 +1017,29 @@ struct protocol_list {
      { 0x8281,	"MPLSCP" },
      { 0x8285,	"IEEE p1284.4 standard - Protocol Control" },
      { 0x8287,	"ETSI TETRA TNP1 Control Protocol" },

+ 1 - 1
package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch

@@ -32,7 +32,7 @@ This reverts commit 3c7b86229f7bd2600d74db14b1fe5b3896be3875.
  
  ifdef NEEDDES
  ifndef USE_CRYPT
--CFLAGS   += -I$(shell $CC --print-sysroot)/usr/include/openssl
+-CFLAGS   += -I$(shell $(CC) --print-sysroot)/usr/include/openssl
 -LIBS     += -lcrypto
 +LIBS     += -ldes $(LIBS)
  else