PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/paulusmack/ppp
-PKG_SOURCE_DATE:=2019-05-25
-PKG_SOURCE_VERSION:=8e77984ac5d7acbe68b2b2f590abd17564c9730d
-PKG_MIRROR_HASH:=7e7e74f0261db2c45770d79c6114e768382e85bfeb3f5a83179f270d6c15006d
+PKG_SOURCE_DATE:=2019-10-04
+PKG_SOURCE_VERSION:=0d004db25edd42f6720f48eedc51f68a781278db
+PKG_MIRROR_HASH:=93f66ee06d58c447288c88ac1c17453c2b12a8af7f16ef132b31529b1955b7a2
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=BSD-4-Clause
PKG_CPE_ID:=cpe:/a:samba:ppp
--- a/pppd/ipcp.c
+++ b/pppd/ipcp.c
-@@ -1958,7 +1958,7 @@ ipcp_up(f)
+@@ -1957,7 +1957,7 @@ ipcp_up(f)
*/
if (ipcp_script_state == s_down && ipcp_script_pid == 0) {
ipcp_script_state = s_up;
}
}
-@@ -2008,7 +2008,7 @@ ipcp_down(f)
+@@ -2007,7 +2007,7 @@ ipcp_down(f)
/* Execute the ip-down script */
if (ipcp_script_state == s_up && ipcp_script_pid == 0) {
ipcp_script_state = s_down;
}
}
-@@ -2062,13 +2062,13 @@ ipcp_script_done(arg)
+@@ -2061,13 +2061,13 @@ ipcp_script_done(arg)
case s_up:
if (ipcp_fsm[0].state != OPENED) {
ipcp_script_state = s_down;
}
--- a/pppd/main.c
+++ b/pppd/main.c
-@@ -308,6 +308,9 @@ main(argc, argv)
+@@ -306,6 +306,9 @@ main(argc, argv)
struct protent *protp;
char numbuf[16];
--- a/pppd/options.c
+++ b/pppd/options.c
-@@ -118,6 +118,8 @@ bool tune_kernel; /* may alter kernel s
+@@ -117,6 +117,8 @@ bool tune_kernel; /* may alter kernel s
int connect_delay = 1000; /* wait this many ms after connect script */
int req_unit = -1; /* requested interface unit */
char req_ifname[MAXIFNAMELEN]; /* requested interface name */
bool multilink = 0; /* Enable multilink operation */
char *bundle_name = NULL; /* bundle name for multilink */
bool dump_options; /* print out option values */
-@@ -317,6 +319,13 @@ option_t general_options[] = {
+@@ -316,6 +318,13 @@ option_t general_options[] = {
"Metric to use for the default route (Linux only; -1 for default behavior)",
OPT_PRIV|OPT_LLIMIT|OPT_INITONLY, NULL, 0, -1 },
--- a/pppd/main.c
+++ b/pppd/main.c
-@@ -768,8 +768,7 @@ detach()
+@@ -776,8 +776,7 @@ detach()
/* update pid files if they have been written already */
if (pidfilename[0])
create_pidfile(pid);
#ifdef PPP_FILTER
#include <pcap-bpf.h>
#endif
-@@ -221,6 +225,14 @@ loop_chars(p, n)
+@@ -220,6 +224,14 @@ loop_chars(p, n)
int c, rv;
rv = 0;
for (; n > 0; --n) {
c = *p++;
if (c == PPP_FLAG) {
-@@ -299,17 +311,102 @@ loop_frame(frame, len)
+@@ -298,17 +310,102 @@ loop_frame(frame, len)
* loopback, now that the real serial link is up.
*/
void
} else {
--- a/pppd/ipcp.c
+++ b/pppd/ipcp.c
-@@ -1883,7 +1883,7 @@ ipcp_up(f)
+@@ -1882,7 +1882,7 @@ ipcp_up(f)
proxy_arp_set[f->unit] = 1;
}
} else {
--- a/pppd/ipv6cp.c
+++ b/pppd/ipv6cp.c
-@@ -1232,7 +1232,7 @@ ipv6cp_up(f)
+@@ -1231,7 +1231,7 @@ ipv6cp_up(f)
}
}
--- a/pppd/ipcp.c
+++ b/pppd/ipcp.c
-@@ -198,6 +198,14 @@ static option_t ipcp_option_list[] = {
+@@ -197,6 +197,14 @@ static option_t ipcp_option_list[] = {
"disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
&ipcp_wantoptions[0].default_route },
{ "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
"Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
{ "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
-@@ -271,7 +279,7 @@ struct protent ipcp_protent = {
+@@ -270,7 +278,7 @@ struct protent ipcp_protent = {
ip_active_pkt
};
static void ipcp_script __P((char *, int)); /* Run an up/down script */
static void ipcp_script_done __P((void *));
-@@ -1761,7 +1769,8 @@ ip_demand_conf(u)
+@@ -1760,7 +1768,8 @@ ip_demand_conf(u)
if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
return 0;
if (wo->default_route)
default_route_set[u] = 1;
if (wo->proxy_arp)
if (sifproxyarp(u, wo->hisaddr))
-@@ -1849,7 +1858,8 @@ ipcp_up(f)
+@@ -1848,7 +1857,8 @@ ipcp_up(f)
*/
if (demand) {
if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
if (go->ouraddr != wo->ouraddr) {
warn("Local IP address changed to %I", go->ouraddr);
script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
-@@ -1874,7 +1884,8 @@ ipcp_up(f)
+@@ -1873,7 +1883,8 @@ ipcp_up(f)
/* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route)
default_route_set[f->unit] = 1;
/* Make a proxy ARP entry if requested. */
-@@ -1924,7 +1935,8 @@ ipcp_up(f)
+@@ -1923,7 +1934,8 @@ ipcp_up(f)
/* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route)
default_route_set[f->unit] = 1;
/* Make a proxy ARP entry if requested. */
-@@ -2002,7 +2014,7 @@ ipcp_down(f)
+@@ -2001,7 +2013,7 @@ ipcp_down(f)
sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
sifdown(f->unit);
ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
}
/* Execute the ip-down script */
-@@ -2018,16 +2030,25 @@ ipcp_down(f)
+@@ -2017,16 +2029,25 @@ ipcp_down(f)
* proxy arp entries, etc.
*/
static void
}
--- a/pppd/sys-solaris.c
+++ b/pppd/sys-solaris.c
-@@ -2039,12 +2039,18 @@ cifaddr(u, o, h)
+@@ -2038,12 +2038,18 @@ cifaddr(u, o, h)
* sifdefaultroute - assign a default route through the address given.
*/
int
--- a/pppd/main.c
+++ b/pppd/main.c
-@@ -310,6 +310,8 @@ main(argc, argv)
+@@ -308,6 +308,8 @@ main(argc, argv)
strlcpy(path_ipup, _PATH_IPUP, sizeof(path_ipup));
strlcpy(path_ipdown, _PATH_IPDOWN, sizeof(path_ipdown));
new_phase(PHASE_INITIALIZE);
--- a/pppd/options.c
+++ b/pppd/options.c
-@@ -120,6 +120,8 @@ int req_unit = -1; /* requested interfa
+@@ -119,6 +119,8 @@ int req_unit = -1; /* requested interfa
char req_ifname[MAXIFNAMELEN]; /* requested interface name */
char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
char path_ipdown[MAXPATHLEN];/* pathname of ip-down script */
bool multilink = 0; /* Enable multilink operation */
char *bundle_name = NULL; /* bundle name for multilink */
bool dump_options; /* print out option values */
-@@ -326,6 +328,13 @@ option_t general_options[] = {
+@@ -325,6 +327,13 @@ option_t general_options[] = {
"Set pathname of ip-down script",
OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
"Enable multilink operation", OPT_PRIO | 1 },
--- a/pppd/ipv6cp.c
+++ b/pppd/ipv6cp.c
-@@ -1269,7 +1269,7 @@ ipv6cp_up(f)
+@@ -1268,7 +1268,7 @@ ipv6cp_up(f)
*/
if (ipv6cp_script_state == s_down && ipv6cp_script_pid == 0) {
ipv6cp_script_state = s_up;
}
}
-@@ -1321,7 +1321,7 @@ ipv6cp_down(f)
+@@ -1320,7 +1320,7 @@ ipv6cp_down(f)
/* Execute the ipv6-down script */
if (ipv6cp_script_state == s_up && ipv6cp_script_pid == 0) {
ipv6cp_script_state = s_down;
}
}
-@@ -1364,13 +1364,13 @@ ipv6cp_script_done(arg)
+@@ -1363,13 +1363,13 @@ ipv6cp_script_done(arg)
case s_up:
if (ipv6cp_fsm[0].state != OPENED) {
ipv6cp_script_state = s_down;
--- a/pppd/lcp.c
+++ b/pppd/lcp.c
-@@ -73,6 +73,7 @@ static void lcp_delayed_up __P((void *))
+@@ -72,6 +72,7 @@ static void lcp_delayed_up __P((void *))
*/
int lcp_echo_interval = 0; /* Interval between LCP echo-requests */
int lcp_echo_fails = 0; /* Tolerance to unanswered echo-requests */
bool lax_recv = 0; /* accept control chars in asyncmap */
bool noendpoint = 0; /* don't send/accept endpoint discriminator */
-@@ -151,6 +152,8 @@ static option_t lcp_option_list[] = {
+@@ -150,6 +151,8 @@ static option_t lcp_option_list[] = {
OPT_PRIO },
{ "lcp-echo-interval", o_int, &lcp_echo_interval,
"Set time in seconds between LCP echo requests", OPT_PRIO },
{ "lcp-restart", o_int, &lcp_fsm[0].timeouttime,
"Set time in seconds between LCP retransmissions", OPT_PRIO },
{ "lcp-max-terminate", o_int, &lcp_fsm[0].maxtermtransmits,
-@@ -2331,6 +2334,22 @@ LcpSendEchoRequest (f)
+@@ -2330,6 +2333,22 @@ LcpSendEchoRequest (f)
}
}
+++ /dev/null
---- a/pppd/plugins/rp-pppoe/config.h
-+++ b/pppd/plugins/rp-pppoe/config.h
-@@ -102,7 +102,7 @@
- #define HAVE_NETPACKET_PACKET_H 1
-
- /* Define if you have the <sys/cdefs.h> header file. */
--#define HAVE_SYS_CDEFS_H 1
-+/* #undef HAVE_SYS_CDEFS_H */
-
- /* Define if you have the <sys/dlpi.h> header file. */
- /* #undef HAVE_SYS_DLPI_H */
+++ /dev/null
---- a/pppd/pppd.h
-+++ b/pppd/pppd.h
-@@ -67,6 +67,9 @@
- #define volatile
- #endif
-
-+#undef __P
-+#define __P(args) args
-+
- #ifdef INET6
- #include "eui64.h"
- #endif
---- a/pppd/magic.h
-+++ b/pppd/magic.h
-@@ -42,6 +42,8 @@
- * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
- */
-
-+#include "pppd.h"
-+
- void magic_init __P((void)); /* Initialize the magic number generator */
- u_int32_t magic __P((void)); /* Returns the next magic number */
-
+++ /dev/null
---- a/pppd/sys-linux.c
-+++ b/pppd/sys-linux.c
-@@ -102,22 +102,15 @@
- #define MAX_ADDR_LEN 7
- #endif
-
--#if __GLIBC__ >= 2
- #include <asm/types.h> /* glibc 2 conflicts with linux/types.h */
- #include <net/if.h>
- #include <net/if_arp.h>
- #include <net/route.h>
- #include <netinet/if_ether.h>
--#else
--#include <linux/types.h>
--#include <linux/if.h>
--#include <linux/if_arp.h>
--#include <linux/route.h>
--#include <linux/if_ether.h>
--#endif
- #include <netinet/in.h>
- #include <arpa/inet.h>
-
-+#include <linux/sockios.h>
- #include <linux/ppp_defs.h>
- #include <linux/if_ppp.h>
-
--- a/pppd/plugins/rp-pppoe/pppoe.h
+++ b/pppd/plugins/rp-pppoe/pppoe.h
-@@ -52,11 +52,7 @@
+@@ -48,11 +48,7 @@
#include <netinet/in.h>
/* Ugly header files on some Linux boxes... */
#ifdef HAVE_NET_IF_TYPES_H
#include <net/if_types.h>
-@@ -84,20 +80,7 @@ typedef unsigned long UINT32_t;
+@@ -80,20 +76,7 @@ typedef unsigned long UINT32_t;
#error Could not find a 32-bit integer type
#endif
#LIBS += -lshadow $(LIBS)
endif
--ifneq ($(wildcard /usr/include/crypt.h),)
-+#ifneq ($(wildcard /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
*/
--- a/pppd/ccp.c
+++ b/pppd/ccp.c
-@@ -62,12 +62,10 @@ static int setdeflate __P((char **));
+@@ -61,12 +61,10 @@ static int setdeflate __P((char **));
static char bsd_value[8];
static char deflate_value[8];
static option_t ccp_option_list[] = {
{ "noccp", o_bool, &ccp_protent.enabled_flag,
-@@ -108,54 +106,36 @@ static option_t ccp_option_list[] = {
+@@ -107,54 +105,36 @@ static option_t ccp_option_list[] = {
"don't allow Predictor-1", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR,
&ccp_allowoptions[0].predictor_1 },
#endif /* MPPE */
{ NULL }
-@@ -241,7 +221,7 @@ static fsm_callbacks ccp_callbacks = {
+@@ -240,7 +220,7 @@ static fsm_callbacks ccp_callbacks = {
*/
#define ANY_COMPRESS(opt) ((opt).deflate || (opt).bsd_compress \
|| (opt).predictor_1 || (opt).predictor_2 \
/*
* Local state (mainly for handling reset-reqs and reset-acks).
-@@ -344,6 +324,100 @@ setdeflate(argv)
+@@ -343,6 +323,100 @@ setdeflate(argv)
return 1;
}
/*
* ccp_init - initialize CCP.
*/
-@@ -378,6 +452,30 @@ ccp_init(unit)
+@@ -377,6 +451,30 @@ ccp_init(unit)
ccp_allowoptions[0].bsd_bits = BSD_MAX_BITS;
ccp_allowoptions[0].predictor_1 = 1;
}
/*
-@@ -455,11 +553,11 @@ ccp_input(unit, p, len)
+@@ -454,11 +552,11 @@ ccp_input(unit, p, len)
if (oldstate == OPENED && p[0] == TERMREQ && f->state != OPENED) {
notice("Compression disabled by peer.");
#ifdef MPPE
}
/*
-@@ -487,6 +585,15 @@ ccp_extcode(f, code, id, p, len)
+@@ -486,6 +584,15 @@ ccp_extcode(f, code, id, p, len)
break;
/* send a reset-ack, which the transmitter will see and
reset its compression state. */
fsm_sdata(f, CCP_RESETACK, id, NULL, 0);
break;
-@@ -515,12 +622,11 @@ ccp_protrej(unit)
+@@ -514,12 +621,11 @@ ccp_protrej(unit)
fsm_lowerdown(&ccp_fsm[unit]);
#ifdef MPPE
}
/*
-@@ -537,7 +643,7 @@ ccp_resetci(f)
+@@ -536,7 +642,7 @@ ccp_resetci(f)
all_rejected[f->unit] = 0;
#ifdef MPPE
ccp_options *ao = &ccp_allowoptions[f->unit];
int auth_mschap_bits = auth_done[f->unit];
int numbits;
-@@ -551,80 +657,109 @@ ccp_resetci(f)
+@@ -550,80 +656,109 @@ ccp_resetci(f)
* NB: If MPPE is required, all other compression opts are invalid.
* So, we return right away if we can't do it.
*/
if (go->bsd_compress) {
opt_buf[0] = CI_BSD_COMPRESS;
opt_buf[1] = CILEN_BSD_COMPRESS;
-@@ -680,7 +815,8 @@ ccp_cilen(f)
+@@ -679,7 +814,8 @@ ccp_cilen(f)
+ (go->deflate && go->deflate_draft? CILEN_DEFLATE: 0)
+ (go->predictor_1? CILEN_PREDICTOR_1: 0)
+ (go->predictor_2? CILEN_PREDICTOR_2: 0)
}
/*
-@@ -694,6 +830,8 @@ ccp_addci(f, p, lenp)
+@@ -693,6 +829,8 @@ ccp_addci(f, p, lenp)
{
int res;
ccp_options *go = &ccp_gotoptions[f->unit];
u_char *p0 = p;
/*
-@@ -702,22 +840,43 @@ ccp_addci(f, p, lenp)
+@@ -701,22 +839,43 @@ ccp_addci(f, p, lenp)
* in case it gets Acked.
*/
#ifdef MPPE
if (go->deflate) {
p[0] = go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT;
p[1] = CILEN_DEFLATE;
-@@ -803,7 +962,7 @@ ccp_addci(f, p, lenp)
+@@ -802,7 +961,7 @@ ccp_addci(f, p, lenp)
/*
* ccp_ackci - process a received configure-ack, and return
*/
static int
ccp_ackci(f, p, len)
-@@ -812,24 +971,44 @@ ccp_ackci(f, p, len)
+@@ -811,24 +970,44 @@ ccp_ackci(f, p, len)
int len;
{
ccp_options *go = &ccp_gotoptions[f->unit];
if (go->deflate) {
if (len < CILEN_DEFLATE
|| p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
-@@ -902,6 +1081,8 @@ ccp_nakci(f, p, len, treat_as_reject)
+@@ -901,6 +1080,8 @@ ccp_nakci(f, p, len, treat_as_reject)
int treat_as_reject;
{
ccp_options *go = &ccp_gotoptions[f->unit];
ccp_options no; /* options we've seen already */
ccp_options try; /* options to ask for next time */
-@@ -909,28 +1090,100 @@ ccp_nakci(f, p, len, treat_as_reject)
+@@ -908,28 +1089,100 @@ ccp_nakci(f, p, len, treat_as_reject)
try = *go;
#ifdef MPPE
if (go->deflate && len >= CILEN_DEFLATE
&& p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
&& p[1] == CILEN_DEFLATE) {
-@@ -1003,14 +1256,50 @@ ccp_rejci(f, p, len)
+@@ -1002,14 +1255,50 @@ ccp_rejci(f, p, len)
return -1;
#ifdef MPPE
if (go->deflate_correct && len >= CILEN_DEFLATE
&& p[0] == CI_DEFLATE && p[1] == CILEN_DEFLATE) {
if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
-@@ -1074,14 +1363,15 @@ ccp_reqci(f, p, lenp, dont_nak)
+@@ -1073,14 +1362,15 @@ ccp_reqci(f, p, lenp, dont_nak)
int dont_nak;
{
int ret, newret, res;
ret = CONFACK;
retp = p0 = p;
-@@ -1104,106 +1394,302 @@ ccp_reqci(f, p, lenp, dont_nak)
+@@ -1103,106 +1393,302 @@ ccp_reqci(f, p, lenp, dont_nak)
switch (type) {
#ifdef MPPE
case CI_MPPE:
case CI_DEFLATE:
case CI_DEFLATE_DRAFT:
if (!ao->deflate || clen != CILEN_DEFLATE
-@@ -1345,12 +1831,6 @@ ccp_reqci(f, p, lenp, dont_nak)
+@@ -1344,12 +1830,6 @@ ccp_reqci(f, p, lenp, dont_nak)
else
*lenp = retp - p0;
}
return ret;
}
-@@ -1372,24 +1852,35 @@ method_name(opt, opt2)
+@@ -1371,24 +1851,35 @@ method_name(opt, opt2)
char *p = result;
char *q = result + sizeof(result); /* 1 past result */
case CI_DEFLATE:
case CI_DEFLATE_DRAFT:
if (opt2 != NULL && opt2->deflate_size != opt->deflate_size)
-@@ -1445,12 +1936,12 @@ ccp_up(f)
+@@ -1444,12 +1935,12 @@ ccp_up(f)
} else if (ANY_COMPRESS(*ho))
notice("%s transmit compression enabled", method_name(ho, NULL));
#ifdef MPPE
}
/*
-@@ -1473,7 +1964,7 @@ ccp_down(f)
+@@ -1472,7 +1963,7 @@ ccp_down(f)
lcp_close(f->unit, "MPPE disabled");
}
}
}
/*
-@@ -1533,24 +2024,28 @@ ccp_printpkt(p, plen, printer, arg)
+@@ -1532,24 +2023,28 @@ ccp_printpkt(p, plen, printer, arg)
#ifdef MPPE
case CI_MPPE:
if (optlen >= CILEN_MPPE) {
case CI_DEFLATE:
case CI_DEFLATE_DRAFT:
if (optlen >= CILEN_DEFLATE) {
-@@ -1636,6 +2131,7 @@ ccp_datainput(unit, pkt, len)
+@@ -1635,6 +2130,7 @@ ccp_datainput(unit, pkt, len)
error("Lost compression sync: disabling compression");
ccp_close(unit, "Lost compression sync");
#ifdef MPPE
/*
* If we were doing MPPE, we must also take the link down.
*/
-@@ -1643,9 +2139,18 @@ ccp_datainput(unit, pkt, len)
+@@ -1642,9 +2138,18 @@ ccp_datainput(unit, pkt, len)
error("Too many MPPE errors, closing LCP");
lcp_close(unit, "Too many MPPE errors");
}
--- a/pppd/chap_ms.c
+++ b/pppd/chap_ms.c
-@@ -963,13 +963,17 @@ set_mppe_enc_types(int policy, int types
+@@ -962,13 +962,17 @@ set_mppe_enc_types(int policy, int types
/*
* Disable undesirable encryption types. Note that we don't ENABLE
* any encryption types, to avoid overriding manual configuration.
--- a/pppd/main.c
+++ b/pppd/main.c
-@@ -90,6 +90,7 @@
+@@ -89,6 +89,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "pppd.h"
#include "magic.h"
-@@ -228,6 +229,7 @@ static struct subprocess *children;
+@@ -226,6 +227,7 @@ static struct subprocess *children;
/* Prototypes for procedures local to this file. */
static void setup_signals __P((void));
static void create_pidfile __P((int pid));
static void create_linkpidfile __P((int pid));
-@@ -527,6 +529,7 @@ main(argc, argv)
+@@ -525,6 +527,7 @@ main(argc, argv)
info("Starting link");
}
gettimeofday(&start_time, NULL);
script_unsetenv("CONNECT_TIME");
script_unsetenv("BYTES_SENT");
-@@ -1262,6 +1265,36 @@ struct callout {
+@@ -1270,6 +1273,36 @@ struct callout {
static struct callout *callout = NULL; /* Callout list */
static struct timeval timenow; /* Current time */
/*
* timeout - Schedule a timeout.
-@@ -1332,6 +1365,8 @@ calltimeout()
+@@ -1340,6 +1373,8 @@ calltimeout()
{
struct callout *p;
while (callout != NULL) {
p = callout;
-@@ -1359,6 +1394,8 @@ timeleft(tvp)
+@@ -1367,6 +1402,8 @@ timeleft(tvp)
{
if (callout == NULL)
return NULL;
--- a/pppd/lcp.c
+++ b/pppd/lcp.c
-@@ -1917,12 +1917,12 @@ lcp_up(f)
+@@ -1916,12 +1916,12 @@ lcp_up(f)
* the interface MTU is set to the lowest of that, the
* MTU we want to use, and our link MRU.
*/
--- a/pppd/main.c
+++ b/pppd/main.c
-@@ -1043,7 +1043,8 @@ get_input()
+@@ -1051,7 +1051,8 @@ get_input()
}
notice("Modem hangup");
hungup = 1;
/*
* There have been 3 or 4 different names for this in libpcap CVS, but
* this seems to be what they have settled on...
-@@ -170,6 +171,13 @@ static int setlogfile __P((char **));
+@@ -169,6 +170,13 @@ static int setlogfile __P((char **));
static int loadplugin __P((char **));
#endif
#ifdef PPP_FILTER
static int setpassfilter __P((char **));
static int setactivefilter __P((char **));
-@@ -362,6 +370,14 @@ option_t general_options[] = {
+@@ -361,6 +369,14 @@ option_t general_options[] = {
"set filter for active pkts", OPT_PRIO },
#endif
#ifdef MAXOCTETS
{ "maxoctets", o_int, &maxoctets,
"Set connection traffic limit",
-@@ -1511,6 +1527,29 @@ callfile(argv)
+@@ -1510,6 +1526,29 @@ callfile(argv)
return ok;
}
&& memcmp(vd.dptr, key.dptr, vd.dsize) == 0;
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
-@@ -686,6 +686,16 @@ void cfg_bundle(int mrru, int mtru, int
+@@ -693,6 +693,16 @@ void cfg_bundle(int mrru, int mtru, int
add_fd(ppp_dev_fd);
}
/*
* make_new_bundle - create a new PPP unit (i.e. a bundle)
* and connect our channel to it. This should only get called
-@@ -704,6 +714,8 @@ void make_new_bundle(int mrru, int mtru,
+@@ -711,6 +721,8 @@ void make_new_bundle(int mrru, int mtru,
/* set the mrru and flags */
cfg_bundle(mrru, mtru, rssn, tssn);
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
-@@ -1753,6 +1753,7 @@ int cifdefaultroute (int unit, u_int32_t
+@@ -1760,6 +1760,7 @@ int cifdefaultroute (int unit, u_int32_t
SIN_ADDR(rt.rt_genmask) = 0L;
}
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
-@@ -1703,6 +1703,9 @@ int sifdefaultroute (int unit, u_int32_t
+@@ -1710,6 +1710,9 @@ int sifdefaultroute (int unit, u_int32_t
memset (&rt, 0, sizeof (rt));
SET_SA_FAMILY (rt.rt_dst, AF_INET);
rt.rt_dev = ifname;
rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */
-@@ -1711,7 +1714,7 @@ int sifdefaultroute (int unit, u_int32_t
+@@ -1718,7 +1721,7 @@ int sifdefaultroute (int unit, u_int32_t
SIN_ADDR(rt.rt_genmask) = 0L;
}
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
-@@ -192,7 +192,7 @@ static int driver_is_old = 0;
+@@ -199,7 +199,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 */
static char loop_name[20];
static unsigned char inbuf[512]; /* buffer for chars read from loopback */
-@@ -210,8 +210,8 @@ static int looped; /* 1 if using loop
+@@ -217,8 +217,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 */
#define MAX_IFS 100
-@@ -1439,11 +1439,12 @@ int ccp_fatal_error (int unit)
+@@ -1446,11 +1446,12 @@ int ccp_fatal_error (int unit)
*
* path_to_procfs - find the path to the proc file system mount point
*/
struct mntent *mntent;
FILE *fp;
-@@ -1465,6 +1466,7 @@ static char *path_to_procfs(const char *
+@@ -1472,6 +1473,7 @@ static char *path_to_procfs(const char *
fclose (fp);
}
}
strlcpy(proc_path + proc_path_len, tail,
sizeof(proc_path) - proc_path_len);
-@@ -2126,15 +2128,19 @@ int ppp_available(void)
+@@ -2133,15 +2135,19 @@ int ppp_available(void)
int my_version, my_modification, my_patch;
int osmaj, osmin, ospatch;
/* XXX should get from driver */
driver_version = 2;
-@@ -2194,6 +2200,7 @@ int ppp_available(void)
+@@ -2201,6 +2207,7 @@ int ppp_available(void)
if (ok && ((ifr.ifr_hwaddr.sa_family & ~0xFF) != ARPHRD_PPP))
ok = 0;
/*
* This is the PPP device. Validate the version of the driver at this
-@@ -2730,6 +2737,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
+@@ -2737,6 +2744,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
}
#endif /* TIOCGPTN */
if (sfd < 0) {
/* the old way - scan through the pty name space */
for (i = 0; i < 64; ++i) {
-@@ -2748,6 +2756,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
+@@ -2755,6 +2763,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
}
}
}
char *pppd_pppoe_service = NULL;
static char *acName = NULL;
static char *existingSession = NULL;
-@@ -385,10 +382,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
+@@ -392,10 +389,6 @@ PPPoEDevnameHook(char *cmd, char **argv,
void
plugin_init(void)
{
--- a/pppd/pppd.h
+++ b/pppd/pppd.h
-@@ -326,7 +326,6 @@ extern int holdoff; /* Dead time before
+@@ -323,7 +323,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 */
extern char linkname[MAXPATHLEN]; /* logical name for link */
--- a/pppd/tty.c
+++ b/pppd/tty.c
-@@ -146,7 +146,7 @@ char *disconnect_script = NULL; /* Scrip
+@@ -145,7 +145,7 @@ char *disconnect_script = NULL; /* Scrip
char *welcomer = NULL; /* Script to run after phys link estab. */
char *ptycommand = NULL; /* Command to run on other side of pty */
bool notty = 0; /* Stdin/out is not a tty */
int max_data_rate; /* max bytes/sec through charshunt */
bool sync_serial = 0; /* Device is synchronous serial device */
char *pty_socket = NULL; /* Socket to connect to pty */
-@@ -202,8 +202,10 @@ option_t tty_options[] = {
+@@ -201,8 +201,10 @@ option_t tty_options[] = {
"Send and receive over socket, arg is host:port",
OPT_PRIO | OPT_DEVNAM },
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
-@@ -2264,6 +2264,7 @@ int ppp_available(void)
+@@ -2271,6 +2271,7 @@ int ppp_available(void)
void logwtmp (const char *line, const char *name, const char *host)
{
struct utmp ut, *utp;
pid_t mypid = getpid();
#if __GLIBC__ < 2
-@@ -2329,6 +2330,7 @@ void logwtmp (const char *line, const ch
+@@ -2336,6 +2337,7 @@ void logwtmp (const char *line, const ch
close (wtmp);
}
#endif
--- a/pppd/main.c
+++ b/pppd/main.c
-@@ -874,14 +874,17 @@ struct protocol_list {
+@@ -882,14 +882,17 @@ struct protocol_list {
const char *name;
} protocol_list[] = {
{ 0x21, "IP" },
{ 0x33, "Stream Protocol ST-II" },
{ 0x35, "Banyan Vines" },
{ 0x39, "AppleTalk EDDP" },
-@@ -895,8 +898,11 @@ struct protocol_list {
+@@ -903,8 +906,11 @@ struct protocol_list {
{ 0x49, "Serial Data Transport Protocol (PPP-SDTP)" },
{ 0x4b, "SNA over 802.2" },
{ 0x4d, "SNA" },
{ 0x53, "Encryption" },
{ 0x55, "Individual Link Encryption" },
{ 0x57, "IPv6" },
-@@ -907,12 +913,15 @@ struct protocol_list {
+@@ -915,12 +921,15 @@ struct protocol_list {
{ 0x65, "RTP IPHC Compressed non-TCP" },
{ 0x67, "RTP IPHC Compressed UDP 8" },
{ 0x69, "RTP IPHC Compressed RTP 8" },
{ 0x0203, "IBM Source Routing BPDU" },
{ 0x0205, "DEC LANBridge100 Spanning Tree" },
{ 0x0207, "Cisco Discovery Protocol" },
-@@ -924,15 +933,19 @@ struct protocol_list {
+@@ -932,15 +941,19 @@ struct protocol_list {
{ 0x0231, "Luxcom" },
{ 0x0233, "Sigma Network Systems" },
{ 0x0235, "Apple Client Server Protocol" },
{ 0x4001, "Cray Communications Control Protocol" },
{ 0x4003, "CDPD Mobile Network Registration Protocol" },
{ 0x4005, "Expand accelerator protocol" },
-@@ -943,8 +956,10 @@ struct protocol_list {
+@@ -951,8 +964,10 @@ struct protocol_list {
{ 0x4023, "RefTek Protocol" },
{ 0x4025, "Fibre Channel" },
{ 0x4027, "EMIT Protocols" },
{ 0x8023, "OSI Network Layer Control Protocol" },
{ 0x8025, "Xerox NS IDP Control Protocol" },
{ 0x8027, "DECnet Phase IV Control Protocol" },
-@@ -953,7 +968,9 @@ struct protocol_list {
+@@ -961,7 +976,9 @@ struct protocol_list {
{ 0x8031, "Bridging NCP" },
{ 0x8033, "Stream Protocol Control Protocol" },
{ 0x8035, "Banyan Vines Control Protocol" },
{ 0x803f, "NETBIOS Framing Control Protocol" },
{ 0x8041, "Cisco Systems Control Protocol" },
{ 0x8043, "Ascom Timeplex" },
-@@ -962,18 +979,24 @@ struct protocol_list {
+@@ -970,18 +987,24 @@ struct protocol_list {
{ 0x8049, "Serial Data Control Protocol (PPP-SDCP)" },
{ 0x804b, "SNA over 802.2 Control Protocol" },
{ 0x804d, "SNA Control Protocol" },
{ 0x8207, "Cisco Discovery Protocol Control" },
{ 0x8209, "Netcs Twin Routing" },
{ 0x820b, "STP - Control Protocol" },
-@@ -982,24 +1005,29 @@ struct protocol_list {
+@@ -990,24 +1013,29 @@ struct protocol_list {
{ 0x8281, "MPLSCP" },
{ 0x8285, "IEEE p1284.4 standard - Protocol Control" },
{ 0x8287, "ETSI TETRA TNP1 Control Protocol" },
--- a/pppd/options.c
+++ b/pppd/options.c
-@@ -350,13 +350,14 @@ option_t general_options[] = {
+@@ -349,13 +349,14 @@ option_t general_options[] = {
"Enable multilink operation", OPT_PRIOSUB | OPT_ALIAS | 1 },
{ "nomultilink", o_bool, &multilink,
"Disable multilink operation", OPT_PRIOSUB | 0 },
ifdef NEEDDES
ifndef USE_CRYPT
--CFLAGS += -I/usr/include/openssl
+-CFLAGS += -I$(shell $CC --print-sysroot)/usr/include/openssl
-LIBS += -lcrypto
+LIBS += -ldes $(LIBS)
else