aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>2020-01-01 15:23:32 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2020-01-05 19:36:45 +0100
commit983605e61f16b76e173fa62092f1b37c3a8e3859 (patch)
tree56022179c9346b59ae8720abb1aabeca7a419b20
parent3d7f76383f87f490ba611aa18af89d33170997ff (diff)
downloadupstream-983605e61f16b76e173fa62092f1b37c3a8e3859.tar.gz
upstream-983605e61f16b76e173fa62092f1b37c3a8e3859.tar.bz2
upstream-983605e61f16b76e173fa62092f1b37c3a8e3859.zip
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 <dengqf6@mail2.sysu.edu.cn>
-rw-r--r--package/network/services/ppp/Makefile11
-rw-r--r--package/network/services/ppp/patches/100-debian_ip-ip_option.patch2
-rw-r--r--package/network/services/ppp/patches/101-debian_close_dev_ppp.patch2
-rw-r--r--package/network/services/ppp/patches/103-debian_fix_link_pidfile.patch2
-rw-r--r--package/network/services/ppp/patches/105-debian_demand.patch8
-rw-r--r--package/network/services/ppp/patches/110-debian_defaultroute.patch26
-rw-r--r--package/network/services/ppp/patches/120-debian_ipv6_updown_option.patch8
-rw-r--r--package/network/services/ppp/patches/121-debian_adaptive_lcp_echo.patch2
-rw-r--r--package/network/services/ppp/patches/133-fix_sha1_include.patch4
-rw-r--r--package/network/services/ppp/patches/200-makefile.patch4
-rw-r--r--package/network/services/ppp/patches/206-compensate_time_change.patch6
-rw-r--r--package/network/services/ppp/patches/208-fix_status_code.patch2
-rw-r--r--package/network/services/ppp/patches/310-precompile_filter.patch2
-rw-r--r--package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch8
-rw-r--r--package/network/services/ppp/patches/330-retain_foreign_default_routes.patch2
-rw-r--r--package/network/services/ppp/patches/340-populate_default_gateway.patch4
-rw-r--r--package/network/services/ppp/patches/400-simplify_kernel_checks.patch18
-rw-r--r--package/network/services/ppp/patches/401-no_record_file.patch2
-rw-r--r--package/network/services/ppp/patches/403-no_wtmp.patch4
-rw-r--r--package/network/services/ppp/patches/404-remove_obsolete_protocol_names.patch16
-rw-r--r--package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch2
21 files changed, 67 insertions, 68 deletions
diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile
index 6b87f20145..451fdb04db 100644
--- a/package/network/services/ppp/Makefile
+++ b/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 <nbd@nbd.name>
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
diff --git a/package/network/services/ppp/patches/100-debian_ip-ip_option.patch b/package/network/services/ppp/patches/100-debian_ip-ip_option.patch
index c9ff869bb1..335ce72b0a 100644
--- a/package/network/services/ppp/patches/100-debian_ip-ip_option.patch
+++ b/package/network/services/ppp/patches/100-debian_ip-ip_option.patch
@@ -85,7 +85,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
"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 */
diff --git a/package/network/services/ppp/patches/101-debian_close_dev_ppp.patch b/package/network/services/ppp/patches/101-debian_close_dev_ppp.patch
index 5b6ae2d39a..62830179b6 100644
--- a/package/network/services/ppp/patches/101-debian_close_dev_ppp.patch
+++ b/package/network/services/ppp/patches/101-debian_close_dev_ppp.patch
@@ -12,7 +12,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- 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;
diff --git a/package/network/services/ppp/patches/103-debian_fix_link_pidfile.patch b/package/network/services/ppp/patches/103-debian_fix_link_pidfile.patch
index 854fe10168..5a764ab9b2 100644
--- a/package/network/services/ppp/patches/103-debian_fix_link_pidfile.patch
+++ b/package/network/services/ppp/patches/103-debian_fix_link_pidfile.patch
@@ -11,7 +11,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- 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);
diff --git a/package/network/services/ppp/patches/105-debian_demand.patch b/package/network/services/ppp/patches/105-debian_demand.patch
index a38e1734be..c68bafa8df 100644
--- a/package/network/services/ppp/patches/105-debian_demand.patch
+++ b/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 */
diff --git a/package/network/services/ppp/patches/110-debian_defaultroute.patch b/package/network/services/ppp/patches/110-debian_defaultroute.patch
index f90005b7e3..38739a5243 100644
--- a/package/network/services/ppp/patches/110-debian_defaultroute.patch
+++ b/package/network/services/ppp/patches/110-debian_defaultroute.patch
@@ -125,9 +125,9 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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 <jo@mein.io>
.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 <jo@mein.io>
+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 <jo@mein.io>
/* 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 <jo@mein.io>
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 <jo@mein.io>
}
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 <jo@mein.io>
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 <jo@mein.io>
}
--- 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
diff --git a/package/network/services/ppp/patches/120-debian_ipv6_updown_option.patch b/package/network/services/ppp/patches/120-debian_ipv6_updown_option.patch
index 1971ac049f..4a9ca7d5e7 100644
--- a/package/network/services/ppp/patches/120-debian_ipv6_updown_option.patch
+++ b/package/network/services/ppp/patches/120-debian_ipv6_updown_option.patch
@@ -48,7 +48,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
"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 <jo@mein.io>
}
}
-@@ -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 <jo@mein.io>
}
}
-@@ -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 <jo@mein.io>
}
--- 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 */
diff --git a/package/network/services/ppp/patches/121-debian_adaptive_lcp_echo.patch b/package/network/services/ppp/patches/121-debian_adaptive_lcp_echo.patch
index 5d47952bc7..510c96ba97 100644
--- a/package/network/services/ppp/patches/121-debian_adaptive_lcp_echo.patch
+++ b/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
diff --git a/package/network/services/ppp/patches/133-fix_sha1_include.patch b/package/network/services/ppp/patches/133-fix_sha1_include.patch
index b5ccd0852d..357d951441 100644
--- a/package/network/services/ppp/patches/133-fix_sha1_include.patch
+++ b/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"
diff --git a/package/network/services/ppp/patches/200-makefile.patch b/package/network/services/ppp/patches/200-makefile.patch
index c4be9f20c4..82b1cc67b9 100644
--- a/package/network/services/ppp/patches/200-makefile.patch
+++ b/package/network/services/ppp/patches/200-makefile.patch
@@ -38,8 +38,8 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
#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
diff --git a/package/network/services/ppp/patches/206-compensate_time_change.patch b/package/network/services/ppp/patches/206-compensate_time_change.patch
index 1f6b6ba44c..a1eb6a716c 100644
--- a/package/network/services/ppp/patches/206-compensate_time_change.patch
+++ b/package/network/services/ppp/patches/206-compensate_time_change.patch
@@ -37,7 +37,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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 <jo@mein.io>
/*
* 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 <jo@mein.io>
while (callout != NULL) {
p = callout;
-@@ -1367,6 +1402,8 @@ timeleft(tvp)
+@@ -1371,6 +1406,8 @@ timeleft(tvp)
{
if (callout == NULL)
return NULL;
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 c0def8b4b3..31460148a4 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@mein.io>
--- 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;
diff --git a/package/network/services/ppp/patches/310-precompile_filter.patch b/package/network/services/ppp/patches/310-precompile_filter.patch
index 2a9370c3e1..a65c19cf1c 100644
--- a/package/network/services/ppp/patches/310-precompile_filter.patch
+++ b/package/network/services/ppp/patches/310-precompile_filter.patch
@@ -77,7 +77,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
#ifdef MAXOCTETS
{ "maxoctets", o_int, &maxoctets,
"Set connection traffic limit",
-@@ -1510,6 +1526,29 @@ callfile(argv)
+@@ -1511,6 +1527,29 @@ callfile(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 b028df4844..75c803650f 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
@@ -41,7 +41,7 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
/* 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 <george@znau.edu.ua>
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 <george@znau.edu.ua>
&& 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 <george@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
-@@ -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);
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
index c50d5480f4..6c0849cc6c 100644
--- a/package/network/services/ppp/patches/330-retain_foreign_default_routes.patch
+++ b/package/network/services/ppp/patches/330-retain_foreign_default_routes.patch
@@ -12,7 +12,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- 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;
}
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 c9a6e8796d..ae385dfc9b 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@mein.io>
--- 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 <jo@mein.io>
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;
}
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 46246cf9e8..0754f8f4d6 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@mein.io>
--- 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 <jo@mein.io>
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 <jo@mein.io>
#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 <jo@mein.io>
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 <jo@mein.io>
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 <jo@mein.io>
/* 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 <jo@mein.io>
/*
* 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 <jo@mein.io>
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 <jo@mein.io>
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)
{
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 cf64b990aa..56a9f02eb8 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@mein.io>
--- 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 */
diff --git a/package/network/services/ppp/patches/403-no_wtmp.patch b/package/network/services/ppp/patches/403-no_wtmp.patch
index 811c5faef8..537a1b0c7f 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@mein.io>
--- 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 <jo@mein.io>
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
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 3b35fe0030..1d94873f35 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@mein.io>
--- 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 <jo@mein.io>
{ 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 <jo@mein.io>
{ 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 <jo@mein.io>
{ 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 <jo@mein.io>
{ 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 <jo@mein.io>
{ 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 <jo@mein.io>
{ 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 <jo@mein.io>
{ 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" },
diff --git a/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch b/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch
index 0a0bae92fb..9676824f5f 100644
--- a/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch
+++ b/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