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>
master
DENG Qingfang 4 years ago committed by Hauke Mehrtens
parent 3d7f76383f
commit 983605e61f

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

@ -85,7 +85,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
"Enable multilink operation", OPT_PRIO | 1 }, "Enable multilink operation", OPT_PRIO | 1 },
--- a/pppd/pppd.h --- a/pppd/pppd.h
+++ b/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 max_data_rate; /* max bytes/sec through charshunt */
extern int req_unit; /* interface unit number to use */ extern int req_unit; /* interface unit number to use */
extern char req_ifname[MAXIFNAMELEN]; /* interface name to use */ extern char req_ifname[MAXIFNAMELEN]; /* interface name to use */

@ -12,7 +12,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/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) { if (new_style_driver) {
int flags; int flags;

@ -11,7 +11,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/main.c --- a/pppd/main.c
+++ b/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 */ /* update pid files if they have been written already */
if (pidfilename[0]) if (pidfilename[0])
create_pidfile(pid); create_pidfile(pid);

@ -150,9 +150,9 @@
} else { } else {
--- a/pppd/ipv6cp.c --- a/pppd/ipv6cp.c
+++ b/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);
+ demand_rexmit(PPP_IPV6,0); + demand_rexmit(PPP_IPV6,0);
@ -161,7 +161,7 @@
} else { } else {
--- a/pppd/pppd.h --- a/pppd/pppd.h
+++ b/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_block __P((void)); /* set all NPs to queue up packets */
void demand_unblock __P((void)); /* set all NPs to pass packets */ void demand_unblock __P((void)); /* set all NPs to pass packets */
void demand_discard __P((void)); /* set all NPs to discard packets */ void demand_discard __P((void)); /* set all NPs to discard packets */

@ -125,9 +125,9 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
bool old_vj; /* use old (short) form of VJ option? */ bool old_vj; /* use old (short) form of VJ option? */
--- a/pppd/pppd.8 --- a/pppd/pppd.8
+++ b/pppd/pppd.8 +++ b/pppd/pppd.8
@@ -127,6 +127,11 @@ is no other default route with the same @@ -133,6 +133,11 @@ the gateway, when IPv6CP negotiation is
value of -1, the route is only added if there is no default route at This entry is removed when the PPP connection is broken. This option
all. is privileged if the \fInodefaultroute6\fR option has been specified.
.TP .TP
+.B replacedefaultroute +.B replacedefaultroute
+This option is a flag to the defaultroute option. If defaultroute is +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 .B disconnect \fIscript
Execute the command specified by \fIscript\fR, by passing it to a Execute the command specified by \fIscript\fR, by passing it to a
shell, after 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 .TP
.B nodefaultroute .B nodefaultroute
Disable the \fIdefaultroute\fR option. The system administrator who 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 +wishes to prevent users from replacing a default route with pppd
can do so by placing this option in the /etc/ppp/options file. can do so by placing this option in the /etc/ppp/options file.
.TP .TP
.B nodeflate .B nodefaultroute6
--- a/pppd/pppd.h --- a/pppd/pppd.h
+++ b/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)); int cif6addr __P((int, eui64_t, eui64_t));
/* Remove an IPv6 address from i/f */ /* Remove an IPv6 address from i/f */
#endif #endif
@ -164,16 +164,16 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
/* Delete default route through i/f */ /* Delete default route through i/f */
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c +++ b/pppd/sys-linux.c
@@ -207,6 +207,8 @@ static unsigned char inbuf[512]; /* buff @@ -209,6 +209,8 @@ static int if_is_up; /* Interface has be
static int if_is_up; /* Interface has been marked up */
static int if6_is_up; /* Interface has been marked up for IPv6, to help differentiate */ 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_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 struct rtentry old_def_rt; /* Old default route */
+static int default_rt_repl_rest; /* replace and restore old default rt */ +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 u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
static char proxy_arp_dev[16]; /* Device for proxy arp entry */ static char proxy_arp_dev[16]; /* Device for proxy arp entry */
static u_int32_t our_old_addr; /* for detecting address changes */ 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; 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_dst) = strtoul(cols[route_dest_col], NULL, 16);
SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_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); 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. * 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)); 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; rt.rt_flags = RTF_UP;
if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) { if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) {
@ -267,7 +267,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
have_default_route = 1; have_default_route = 1;
return 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; rt.rt_flags = RTF_UP;
if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) { if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) {
if (still_ppp()) { if (still_ppp()) {
@ -292,7 +292,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
} }
--- a/pppd/sys-solaris.c --- a/pppd/sys-solaris.c
+++ b/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. * sifdefaultroute - assign a default route through the address given.
*/ */
int int

@ -48,7 +48,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
"Enable multilink operation", OPT_PRIO | 1 }, "Enable multilink operation", OPT_PRIO | 1 },
--- a/pppd/ipv6cp.c --- a/pppd/ipv6cp.c
+++ b/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) { if (ipv6cp_script_state == s_down && ipv6cp_script_pid == 0) {
ipv6cp_script_state = s_up; 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 */ /* Execute the ipv6-down script */
if (ipv6cp_script_state == s_up && ipv6cp_script_pid == 0) { if (ipv6cp_script_state == s_up && ipv6cp_script_pid == 0) {
ipv6cp_script_state = s_down; 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: case s_up:
if (ipv6cp_fsm[0].state != OPENED) { if (ipv6cp_fsm[0].state != OPENED) {
ipv6cp_script_state = s_down; ipv6cp_script_state = s_down;
@ -84,7 +84,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
} }
--- a/pppd/pppd.h --- a/pppd/pppd.h
+++ b/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 req_ifname[MAXIFNAMELEN]; /* interface name to use */
extern char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */ extern char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
extern char path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */ extern char path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */

@ -42,7 +42,7 @@
*/ */
--- a/pppd/pppd.8 --- a/pppd/pppd.8
+++ b/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 dynamic IP address option (i.e. set /proc/sys/net/ipv4/ip_dynaddr to
1) in demand mode if the local address changes. 1) in demand mode if the local address changes.
.TP .TP

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

@ -38,8 +38,8 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
#LIBS += -lshadow $(LIBS) #LIBS += -lshadow $(LIBS)
endif 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 CFLAGS += -DHAVE_CRYPT_H=1
LIBS += -lcrypt LIBS += -lcrypt
-endif -endif

@ -37,7 +37,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
gettimeofday(&start_time, NULL); gettimeofday(&start_time, NULL);
script_unsetenv("CONNECT_TIME"); script_unsetenv("CONNECT_TIME");
script_unsetenv("BYTES_SENT"); 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 callout *callout = NULL; /* Callout list */
static struct timeval timenow; /* Current time */ static struct timeval timenow; /* Current time */
@ -74,7 +74,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
/* /*
* timeout - Schedule a timeout. * timeout - Schedule a timeout.
@@ -1340,6 +1373,8 @@ calltimeout() @@ -1344,6 +1377,8 @@ calltimeout()
{ {
struct callout *p; struct callout *p;
@ -83,7 +83,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
while (callout != NULL) { while (callout != NULL) {
p = callout; p = callout;
@@ -1367,6 +1402,8 @@ timeleft(tvp) @@ -1371,6 +1406,8 @@ timeleft(tvp)
{ {
if (callout == NULL) if (callout == NULL)
return NULL; return NULL;

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

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

@ -41,7 +41,7 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
/* make sure the string is null-terminated */ /* make sure the string is null-terminated */
rec.dptr[rec.dsize-1] = 0; rec.dptr[rec.dsize-1] = 0;
- /* parse the interface number */ - /* parse the interface number */
- parse_num(rec.dptr, "IFNAME=ppp", &unit); - parse_num(rec.dptr, "UNIT=", &unit);
+ +
/* check the pid value */ /* check the pid value */
if (!parse_num(rec.dptr, "PPPD_PID=", &pppd_pid) 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; TDB_DATA kd, vd;
int ret = 0; 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); + slprintf(ifkey, sizeof(ifkey), "IFNAME=%s", ifname);
+ +
kd.dptr = ifkey; kd.dptr = ifkey;
@ -126,7 +126,7 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
&& memcmp(vd.dptr, key.dptr, vd.dsize) == 0; && memcmp(vd.dptr, key.dptr, vd.dsize) == 0;
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/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); 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) * make_new_bundle - create a new PPP unit (i.e. a bundle)
* and connect our channel to it. This should only get called * 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 */ /* set the mrru and flags */
cfg_bundle(mrru, mtru, rssn, tssn); cfg_bundle(mrru, mtru, rssn, tssn);

@ -12,7 +12,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/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; SIN_ADDR(rt.rt_genmask) = 0L;
} }

@ -13,7 +13,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/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)); memset (&rt, 0, sizeof (rt));
SET_SA_FAMILY (rt.rt_dst, AF_INET); 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_dev = ifname;
rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */ 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; SIN_ADDR(rt.rt_genmask) = 0L;
} }

@ -10,7 +10,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/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 int restore_term = 0; /* 1 => we've munged the terminal */
static struct termios inittermios; /* Initial TTY termios */ 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 char loop_name[20];
static unsigned char inbuf[512]; /* buffer for chars read from loopback */ 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 int link_mtu; /* mtu for the link (not bundle) */
static struct utsname utsname; /* for the kernel version */ 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 #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 * 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; struct mntent *mntent;
FILE *fp; 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); fclose (fp);
} }
} }
@ -52,7 +52,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
strlcpy(proc_path + proc_path_len, tail, strlcpy(proc_path + proc_path_len, tail,
sizeof(proc_path) - proc_path_len); 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 my_version, my_modification, my_patch;
int osmaj, osmin, ospatch; int osmaj, osmin, ospatch;
@ -72,7 +72,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
/* XXX should get from driver */ /* XXX should get from driver */
driver_version = 2; 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)) if (ok && ((ifr.ifr_hwaddr.sa_family & ~0xFF) != ARPHRD_PPP))
ok = 0; 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 * 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 */ #endif /* TIOCGPTN */
@ -88,7 +88,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
if (sfd < 0) { if (sfd < 0) {
/* the old way - scan through the pty name space */ /* the old way - scan through the pty name space */
for (i = 0; i < 64; ++i) { 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; char *pppd_pppoe_service = NULL;
static char *acName = NULL; static char *acName = NULL;
static char *existingSession = NULL; static char *existingSession = NULL;
@@ -392,10 +389,6 @@ PPPoEDevnameHook(char *cmd, char **argv, @@ -394,10 +391,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
void void
plugin_init(void) plugin_init(void)
{ {

@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/pppd.h --- a/pppd/pppd.h
+++ b/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 holdoff_specified; /* true if user gave a holdoff value */
extern bool notty; /* Stdin/out is not a tty */ extern bool notty; /* Stdin/out is not a tty */
extern char *pty_socket; /* Socket to connect to pty */ extern char *pty_socket; /* Socket to connect to pty */

@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c --- a/pppd/sys-linux.c
+++ b/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) 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; struct utmp ut, *utp;
pid_t mypid = getpid(); pid_t mypid = getpid();
#if __GLIBC__ < 2 #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); close (wtmp);
} }
#endif #endif

@ -7,7 +7,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/main.c --- a/pppd/main.c
+++ b/pppd/main.c +++ b/pppd/main.c
@@ -882,14 +882,17 @@ struct protocol_list { @@ -886,14 +886,17 @@ struct protocol_list {
const char *name; const char *name;
} protocol_list[] = { } protocol_list[] = {
{ 0x21, "IP" }, { 0x21, "IP" },
@ -25,7 +25,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x33, "Stream Protocol ST-II" }, { 0x33, "Stream Protocol ST-II" },
{ 0x35, "Banyan Vines" }, { 0x35, "Banyan Vines" },
{ 0x39, "AppleTalk EDDP" }, { 0x39, "AppleTalk EDDP" },
@@ -903,8 +906,11 @@ struct protocol_list { @@ -907,8 +910,11 @@ struct protocol_list {
{ 0x49, "Serial Data Transport Protocol (PPP-SDTP)" }, { 0x49, "Serial Data Transport Protocol (PPP-SDTP)" },
{ 0x4b, "SNA over 802.2" }, { 0x4b, "SNA over 802.2" },
{ 0x4d, "SNA" }, { 0x4d, "SNA" },
@ -37,7 +37,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x53, "Encryption" }, { 0x53, "Encryption" },
{ 0x55, "Individual Link Encryption" }, { 0x55, "Individual Link Encryption" },
{ 0x57, "IPv6" }, { 0x57, "IPv6" },
@@ -915,12 +921,15 @@ struct protocol_list { @@ -919,12 +925,15 @@ struct protocol_list {
{ 0x65, "RTP IPHC Compressed non-TCP" }, { 0x65, "RTP IPHC Compressed non-TCP" },
{ 0x67, "RTP IPHC Compressed UDP 8" }, { 0x67, "RTP IPHC Compressed UDP 8" },
{ 0x69, "RTP IPHC Compressed RTP 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" }, { 0x0203, "IBM Source Routing BPDU" },
{ 0x0205, "DEC LANBridge100 Spanning Tree" }, { 0x0205, "DEC LANBridge100 Spanning Tree" },
{ 0x0207, "Cisco Discovery Protocol" }, { 0x0207, "Cisco Discovery Protocol" },
@@ -932,15 +941,19 @@ struct protocol_list { @@ -936,15 +945,19 @@ struct protocol_list {
{ 0x0231, "Luxcom" }, { 0x0231, "Luxcom" },
{ 0x0233, "Sigma Network Systems" }, { 0x0233, "Sigma Network Systems" },
{ 0x0235, "Apple Client Server Protocol" }, { 0x0235, "Apple Client Server Protocol" },
@ -73,7 +73,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x4001, "Cray Communications Control Protocol" }, { 0x4001, "Cray Communications Control Protocol" },
{ 0x4003, "CDPD Mobile Network Registration Protocol" }, { 0x4003, "CDPD Mobile Network Registration Protocol" },
{ 0x4005, "Expand accelerator protocol" }, { 0x4005, "Expand accelerator protocol" },
@@ -951,8 +964,10 @@ struct protocol_list { @@ -955,8 +968,10 @@ struct protocol_list {
{ 0x4023, "RefTek Protocol" }, { 0x4023, "RefTek Protocol" },
{ 0x4025, "Fibre Channel" }, { 0x4025, "Fibre Channel" },
{ 0x4027, "EMIT Protocols" }, { 0x4027, "EMIT Protocols" },
@ -84,7 +84,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x8023, "OSI Network Layer Control Protocol" }, { 0x8023, "OSI Network Layer Control Protocol" },
{ 0x8025, "Xerox NS IDP Control Protocol" }, { 0x8025, "Xerox NS IDP Control Protocol" },
{ 0x8027, "DECnet Phase IV 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" }, { 0x8031, "Bridging NCP" },
{ 0x8033, "Stream Protocol Control Protocol" }, { 0x8033, "Stream Protocol Control Protocol" },
{ 0x8035, "Banyan Vines 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" }, { 0x803f, "NETBIOS Framing Control Protocol" },
{ 0x8041, "Cisco Systems Control Protocol" }, { 0x8041, "Cisco Systems Control Protocol" },
{ 0x8043, "Ascom Timeplex" }, { 0x8043, "Ascom Timeplex" },
@@ -970,18 +987,24 @@ struct protocol_list { @@ -974,18 +991,24 @@ struct protocol_list {
{ 0x8049, "Serial Data Control Protocol (PPP-SDCP)" }, { 0x8049, "Serial Data Control Protocol (PPP-SDCP)" },
{ 0x804b, "SNA over 802.2 Control Protocol" }, { 0x804b, "SNA over 802.2 Control Protocol" },
{ 0x804d, "SNA Control Protocol" }, { 0x804d, "SNA Control Protocol" },
@ -119,7 +119,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
{ 0x8207, "Cisco Discovery Protocol Control" }, { 0x8207, "Cisco Discovery Protocol Control" },
{ 0x8209, "Netcs Twin Routing" }, { 0x8209, "Netcs Twin Routing" },
{ 0x820b, "STP - Control Protocol" }, { 0x820b, "STP - Control Protocol" },
@@ -990,24 +1013,29 @@ struct protocol_list { @@ -994,24 +1017,29 @@ struct protocol_list {
{ 0x8281, "MPLSCP" }, { 0x8281, "MPLSCP" },
{ 0x8285, "IEEE p1284.4 standard - Protocol Control" }, { 0x8285, "IEEE p1284.4 standard - Protocol Control" },
{ 0x8287, "ETSI TETRA TNP1 Control Protocol" }, { 0x8287, "ETSI TETRA TNP1 Control Protocol" },

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

Loading…
Cancel
Save