...
 
Commits (19)
......@@ -89,7 +89,7 @@ specifying phone number, username, and password from Win9x.
Inbound dial-up using dial-up scripts:
A PPP session can be established from the regular Linux prompt by executing
/usr/sbin/pppd. The user is limited to use the assigned IP adddress in
/usr/sbin/pppd. The user is limited to use the assigned IP address in
/etc/ppp/options.ttyname and will not be able to override it.
Note: there is support for callback, it can be done through scripts
......
ppp (2.4.7-2+1) UNRELEASED; urgency=medium
* Switch to debhelper compat level 10.
- Set debian/compat to 10.
- Bump Build-Depends on debhelper to >= 10~.
- Remove Build-Depends on dh-systemd.
- Remove implicit --with systemd from debian/rules.
* Update Standards-Version to 4.1.2:
- Remove Priority extra from ppp-dev.
* debian/rules: use dpkg helpers for parsing debian/changelog.
* Incorporate the EAP-TLS patch for pppd: (Closes: #602503)
- debian/patches/eaptls-mppe.patch: add ppp-2.4.7-eaptls-mppe-0.999.patch.
- debian/control: add libssl-dev to Build-Depends.
- debian/changelog: bump the ABI revision number to account for removed
symbols (MD5 now comes from OpenSSL).
- debian/rules: don't include EAP-TLS support in the udeb build.
* debian/changelog: remove trailing whitepace.
* Switch to OpenSSL implementations of MD4, MD5 and SHA1: (Closes: #826625)
- debian/patches/replace-vendored-hash-functions.patch: remove embedded
crypto code copies, unconditionally link with libcrypto, update
includes, amend call sites as required.
- debian/ppp.symbols: remove dropped symbols.
* Import patches added to upstream Git since the 2.4.7 upstream release,
correcting numerous minor bugs. Of note:
- 0002-pppd-add-support-for-defaultroute-metric-option.patch: this patch
is NOT currently applied due to conflicts with the cifdefroute.dif
patch, which adds the replacedefaultroute and noreplacedefaultroute
options.
- 0013-pppd-allow-use-of-arbitrary-interface-names.patch: upstream import
of our ppp-2.4.2-ifname.diff patch.
- 0016-pppoe-include-netinet-in.h-before-linux-in.h.patch: upstream patch
that replaces our fix-rp-pppoe-ftbfs.patch.
- Refreshed 018_ip-up_option.diff and makefiles_cleanup on top of the new
patches.
* Tweak pon and poff bash-completions files for new versions of
bash-completion. (Closes: #882199)
* debian/ppp-udeb.postinst: consider interface names using udev predictable
iterface naming. (Closes: #873391)
-- Chris Boot <bootc@debian.org> Sun, 17 Dec 2017 12:35:51 +0000
ppp (2.4.7-1+4) unstable; urgency=medium
[ Helmut Grohne ]
* Mark ppp-dev Multi-Arch: foreign (Closes: #842890)
[ Chris Boot ]
* Run wrap-and-sort.
* ppp: add lsb-base to Depends for pppd-dns init script.
* Fix FTBFS in rp-pppoe with linux 4.8 headers.
-- Chris Boot <bootc@debian.org> Fri, 11 Nov 2016 15:03:42 +0000
ppp (2.4.7-1+3) unstable; urgency=medium
* PPPoE: permit setting an arbitrary Host-Uniq field value:
add patch pr-28-pppoe-custom-host-uniq-tag.patch (Closes: #828968)
* Update Standards-Version to 3.9.8 (no changes required).
* Update Vcs-Browser and Vcs-Git to use https:// URLs.
* Fix a typo in README.Debian.
-- Chris Boot <bootc@debian.org> Mon, 29 Aug 2016 00:15:43 +0100
ppp (2.4.7-1+2) unstable; urgency=medium
* Replace my email address for my debian.org address.
......@@ -478,7 +541,7 @@ ppp (2.4.4rel-4.1) unstable; urgency=low
* Non-maintainer upload with maintainer's consent.
* New patch fix_mschapv2_ppp which makes ppp works with mschapv2. Thanks
to Guillaume Knispel <gknispel@proformatique.com>. Closes: #381420.
* Add hints section to README.pppoe (pppoe_readme patch) and iptables to
* Add hints section to README.pppoe (pppoe_readme patch) and iptables to
Suggests. Thanks to Joerg Dorchain <joerg@dorchain.net>. Closes: #251918.
* Improve the chat manpage concerning timeout (chap_man patch).
Closes: #320494.
......
......@@ -4,16 +4,29 @@ Priority: optional
Homepage: http://ppp.samba.org/
Maintainer: Chris Boot <bootc@debian.org>
Uploaders: Marco d'Itri <md@linux.it>
Build-Depends: debhelper (>= 9~), libpcap0.8-dev, libpam0g-dev, zlib1g-dev,
dh-systemd
Standards-Version: 3.9.6
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/pkg-ppp.git
Vcs-Git: git://anonscm.debian.org/collab-maint/pkg-ppp.git
Build-Depends:
debhelper (>= 10~),
libpam0g-dev,
libpcap0.8-dev,
libssl-dev,
zlib1g-dev,
Standards-Version: 4.1.2
Vcs-Browser: https://anonscm.debian.org/git/collab-maint/pkg-ppp.git
Vcs-Git: https://anonscm.debian.org/git/collab-maint/pkg-ppp.git
Package: ppp
Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-modules, libpam-runtime, procps
Breaks: network-manager (<< 0.9.8.8-7~), network-manager-pptp (<< 0.9.8.4-3~), pppdcapiplugin (<< 1:3.25+dfsg1-3.4~)
Depends:
libpam-modules,
libpam-runtime,
lsb-base,
procps,
${misc:Depends},
${shlibs:Depends},
Breaks:
network-manager (<< 0.9.8.8-7~),
network-manager-pptp (<< 0.9.8.4-3~),
pppdcapiplugin (<< 1:3.25+dfsg1-3.4~),
Description: Point-to-Point Protocol (PPP) - daemon
The Point-to-Point Protocol provides a standard way to transmit
datagrams over a serial link, as well as a standard way for the machines
......@@ -27,7 +40,12 @@ Package: ppp-udeb
Package-Type: udeb
Section: debian-installer
Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}, ethernet-card-detection, ppp-modules, di-utils
Depends:
di-utils,
ethernet-card-detection,
ppp-modules,
${misc:Depends},
${shlibs:Depends},
Provides: configured-network
XB-Installer-Menu-Item: 1700
Description: Point-to-Point Protocol (PPP) - package for Debian Installer
......@@ -41,8 +59,8 @@ Description: Point-to-Point Protocol (PPP) - package for Debian Installer
Package: ppp-dev
Section: devel
Architecture: all
Priority: extra
Depends: ${shlibs:Depends}, ${misc:Depends}
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Suggests: debhelper
Description: Point-to-Point Protocol (PPP) - development files
The Point-to-Point Protocol provides a standard way to transmit
......
......@@ -262,7 +262,7 @@ as an exception to the license, linking with OpenSSL is allowed.
pppd/plugins/winbind.c is licensed under the GNU GPL version 2 or later
and is:
* Copyright (C) 2003 Andrew Bartlet <abartlet@samba.org>
* Copyright 1999 Paul Mackerras, Alan Curry.
* Copyright 1999 Paul Mackerras, Alan Curry.
* Copyright (C) 2002 Roaring Penguin Software Inc.
pppd/plugins/pppoatm.c is licensed under the GNU GPL version 2 or later
......@@ -363,4 +363,3 @@ documentation and/or software.
*
* This plugin may be distributed according to the terms of the GNU
* General Public License, version 2 or (at your option) any later version.
# Debian GNU/Linux pon/poff(1) completion
# Copyright 2002 Baruch Even <baruch@debian.org>
# License: GNU GPL v2 or later
_poff()
{
local prev cur conns
[ -r /etc/ppp/peers/ ] || return 0
COMPREPLY=()
prev=${COMP_WORDS[COMP_CWORD-1]}
cur=${COMP_WORDS[COMP_CWORD]}
conns=$(\ls --color=none /etc/ppp/peers | egrep -v '(\.bak|~)$')
if [[ "$cur" == -* ]]; then
COMPREPLY=( $(compgen -W '-r -d -c -a -h -v' -- $cur) )
return 0
fi
# first parameter on line or first since an option?
if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]] || \
[[ "$prev" == -* ]]; then
COMPREPLY=( $(compgen -o filenames -W "$conns" $cur) )
fi
return 0
}
complete -F _poff poff
# vim:ft=sh:
......@@ -2,50 +2,22 @@
# Copyright 2002 Baruch Even <baruch@debian.org>
# License: GNU GPL v2 or later
have pon &&
_pon()
{
local cur conns
[ -r /etc/ppp/peers/ ] || return 0
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
conns=$(\ls --color=none /etc/ppp/peers | egrep -v '(\.bak|~)$')
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $(compgen -o filenames -W "$conns" $cur) )
fi
return 0
}
[ "$have" ] && complete -F _pon pon
have poff &&
_poff()
{
local prev cur conns
[ -r /etc/ppp/peers/ ] || return 0
COMPREPLY=()
prev=${COMP_WORDS[COMP_CWORD-1]}
cur=${COMP_WORDS[COMP_CWORD]}
conns=$(\ls --color=none /etc/ppp/peers | egrep -v '(\.bak|~)$')
if [[ "$cur" == -* ]]; then
COMPREPLY=( $(compgen -W '-r -d -c -a -h -v' -- $cur) )
return 0
fi
# first parameter on line or first since an option?
if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]] || \
[[ "$prev" == -* ]]; then
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $(compgen -o filenames -W "$conns" $cur) )
fi
return 0
}
[ "$have" ] && complete -F _poff poff
complete -F _pon pon
# vim:ft=sh:
From 5e90783d11a59268e05f4cfb29ce2343b13e8ab2 Mon Sep 17 00:00:00 2001
From: Martin von Gagern <Martin.vGagern@gmx.net>
Date: Sat, 9 Aug 2014 22:44:45 -0400
Subject: [PATCH 01/16] abort on errors in subdir builds
The current recursive loops do not check the exit status of make
in subdirs which leads to `make` passing even when a subdir failed
to compile or install.
URL: https://bugs.gentoo.org/334727
Signed-off-by: Martin von Gagern <Martin.vGagern@gmx.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
pppd/plugins/Makefile.linux | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
index ab8cf50d9472..8a90e393a057 100644
--- a/pppd/plugins/Makefile.linux
+++ b/pppd/plugins/Makefile.linux
@@ -27,7 +27,7 @@ include .depend
endif
all: $(PLUGINS)
- for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
+ for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all || exit $$?; done
%.so: %.c
$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
@@ -37,12 +37,12 @@ VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
install: $(PLUGINS)
$(INSTALL) -d $(LIBDIR)
$(INSTALL) $? $(LIBDIR)
- for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d install; done
+ for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d install || exit $$?; done
clean:
rm -f *.o *.so *.a
- for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done
+ for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean || exit $$?; done
depend:
$(CPP) -M $(CFLAGS) *.c >.depend
- for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done
+ for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend || exit $$?; done
--
2.15.1
From 35e5a569c988b1ff865b02a24d9a727a00db4da9 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 3 Jun 2014 08:53:47 +0000
Subject: [PATCH 02/16] pppd: add support for defaultroute-metric option
This allows user to specify the 'metric' (or 'prio') for the default
route set by pppd. This is useful in multi-ISP setups where there
might be more than one default gateway.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
pppd/options.c | 5 +++++
pppd/pppd.8 | 6 ++++++
pppd/sys-linux.c | 28 +++++++++++++++++++---------
3 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/pppd/options.c b/pppd/options.c
index 45fa742cd9ce..ca3f8750c8bb 100644
--- a/pppd/options.c
+++ b/pppd/options.c
@@ -121,6 +121,7 @@ bool dryrun; /* print out option values and exit */
char *domain; /* domain name set by domain option */
int child_wait = 5; /* # seconds to wait for children at exit */
struct userenv *userenv_list; /* user environment variables */
+int dfl_route_metric = -1; /* metric of the default route to set over the PPP link */
#ifdef MAXOCTETS
unsigned int maxoctets = 0; /* default - no limit */
@@ -299,6 +300,10 @@ option_t general_options[] = {
"Unset user environment variable",
OPT_A2PRINTER | OPT_NOPRINT, (void *)user_unsetprint },
+ { "defaultroute-metric", o_int, &dfl_route_metric,
+ "Metric to use for the default route (Linux only; -1 for default behavior)",
+ OPT_PRIV|OPT_LLIMIT|OPT_INITONLY, NULL, 0, -1 },
+
#ifdef HAVE_MULTILINK
{ "multilink", o_bool, &multilink,
"Enable multilink operation", OPT_PRIO | 1 },
diff --git a/pppd/pppd.8 b/pppd/pppd.8
index e2768b135273..c508d277df3a 100644
--- a/pppd/pppd.8
+++ b/pppd/pppd.8
@@ -121,6 +121,12 @@ the gateway, when IPCP negotiation is successfully completed.
This entry is removed when the PPP connection is broken. This option
is privileged if the \fInodefaultroute\fR option has been specified.
.TP
+.B defaultroute-metric
+Define the metric of the \fIdefaultroute\fR and only add it if there
+is no other default route with the same metric. With the default
+value of -1, the route is only added if there is no default route at
+all.
+.TP
.B disconnect \fIscript
Execute the command specified by \fIscript\fR, by passing it to a
shell, after
diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
index 72a7727c403f..37bdda4d7818 100644
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -232,7 +232,7 @@ static int baud_rate_of (int speed);
static void close_route_table (void);
static int open_route_table (void);
static int read_route_table (struct rtentry *rt);
-static int defaultroute_exists (struct rtentry *rt);
+static int defaultroute_exists (struct rtentry *rt, int metric);
static int get_ether_addr (u_int32_t ipaddr, struct sockaddr *hwaddr,
char *name, int namelen);
static void decode_version (char *buf, int *version, int *mod, int *patch);
@@ -242,6 +242,8 @@ static int make_ppp_unit(void);
extern u_char inpacket_buf[]; /* borrowed from main.c */
+extern int dfl_route_metric;
+
/*
* SET_SA_FAMILY - set the sa_family field of a struct sockaddr,
* if it exists.
@@ -1439,7 +1441,7 @@ static char *path_to_procfs(const char *tail)
FILE *route_fd = (FILE *) 0;
static char route_buffer[512];
static int route_dev_col, route_dest_col, route_gw_col;
-static int route_flags_col, route_mask_col;
+static int route_flags_col, route_metric_col, route_mask_col;
static int route_num_cols;
static int open_route_table (void);
@@ -1482,6 +1484,7 @@ static int open_route_table (void)
route_dest_col = 1;
route_gw_col = 2;
route_flags_col = 3;
+ route_metric_col = 6;
route_mask_col = 7;
route_num_cols = 8;
@@ -1542,6 +1545,7 @@ static int read_route_table(struct rtentry *rt)
SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
rt->rt_flags = (short) strtoul(cols[route_flags_col], NULL, 16);
+ rt->rt_metric = (short) strtoul(cols[route_metric_col], NULL, 10);
rt->rt_dev = cols[route_dev_col];
return 1;
@@ -1550,9 +1554,10 @@ static int read_route_table(struct rtentry *rt)
/********************************************************************
*
* defaultroute_exists - determine if there is a default route
+ * with the given metric (or negative for any)
*/
-static int defaultroute_exists (struct rtentry *rt)
+static int defaultroute_exists (struct rtentry *rt, int metric)
{
int result = 0;
@@ -1565,7 +1570,8 @@ static int defaultroute_exists (struct rtentry *rt)
if (kernel_version > KVERSION(2,1,0) && SIN_ADDR(rt->rt_genmask) != 0)
continue;
- if (SIN_ADDR(rt->rt_dst) == 0L) {
+ if (SIN_ADDR(rt->rt_dst) == 0L && (metric < 0
+ || rt->rt_metric == metric)) {
result = 1;
break;
}
@@ -1612,13 +1618,13 @@ int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
{
struct rtentry rt;
- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
+ if (defaultroute_exists(&rt, dfl_route_metric) && strcmp(rt.rt_dev, ifname) != 0) {
if (rt.rt_flags & RTF_GATEWAY)
- error("not replacing existing default route via %I",
- SIN_ADDR(rt.rt_gateway));
+ error("not replacing existing default route via %I with metric %d",
+ SIN_ADDR(rt.rt_gateway), dfl_route_metric);
else
- error("not replacing existing default route through %s",
- rt.rt_dev);
+ error("not replacing existing default route through %s with metric %d",
+ rt.rt_dev, dfl_route_metric);
return 0;
}
@@ -1626,6 +1632,7 @@ int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
SET_SA_FAMILY (rt.rt_dst, AF_INET);
rt.rt_dev = ifname;
+ rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */
if (kernel_version > KVERSION(2,1,0)) {
SET_SA_FAMILY (rt.rt_genmask, AF_INET);
@@ -1660,6 +1667,9 @@ int cifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
rt.rt_dev = ifname;
+ rt.rt_dev = ifname;
+ rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */
+
if (kernel_version > KVERSION(2,1,0)) {
SET_SA_FAMILY (rt.rt_genmask, AF_INET);
SIN_ADDR(rt.rt_genmask) = 0L;
--
2.15.1
From 67811a647d399db5d188a242827760615a0f86b5 Mon Sep 17 00:00:00 2001
From: radaiming <radaiming@gmail.com>
Date: Sat, 13 Dec 2014 14:42:34 +0800
Subject: [PATCH 03/16] scripts: Avoid killing wrong pppd
poff could kill other pppd processes when there are many pppd
running on different serial port.
Signed-off-by: Ming Dai <radaiming@gmail.com>
---
scripts/poff | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/poff b/scripts/poff
index 3f55a7f40010..5b45d98a2b6a 100644
--- a/scripts/poff
+++ b/scripts/poff
@@ -91,7 +91,7 @@ if test "$#" -eq 0 -o "$MODE" = "all" ; then
fi
# There is an argument, so kill the pppd started on that provider.
-PID=`ps axw | grep "[ /]pppd call $1" | awk '{print $1}'`
+PID=`ps axw | grep "[ /]pppd call $1" | grep -w "$1" | awk '{print $1}'`
if test -n "$PID" ; then
$KILL -$SIG $PID || {
echo "$0: $KILL failed. None ${DONE}."
--
2.15.1
From 5e8c3cb256a7e86e3572a82a75d51c6850efdbdc Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp@redfish-solutions.com>
Date: Fri, 19 Dec 2014 17:52:58 -0700
Subject: [PATCH 04/16] pppd: Fix sign-extension when displaying bytes in octal
print_string() displays characters as \\%.03o but without first
casting it from "char" to "unsigned char" so it gets sign-extended
to an int. This causes output like \37777777630 instead of \230.
Signed-off-by: Philip A. Prindeville <philipp@redfish-solutions.com>
---
pppd/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pppd/utils.c b/pppd/utils.c
index 29bf970905d5..3ac1b60926d2 100644
--- a/pppd/utils.c
+++ b/pppd/utils.c
@@ -625,7 +625,7 @@ print_string(p, len, printer, arg)
printer(arg, "\\t");
break;
default:
- printer(arg, "\\%.3o", c);
+ printer(arg, "\\%.3o", (unsigned char) c);
}
}
}
--
2.15.1
From 219aac3b53d0827549377f1bfe22853ee52d4405 Mon Sep 17 00:00:00 2001
From: Simon Farnsworth <simon@farnz.org.uk>
Date: Sun, 1 Mar 2015 11:49:06 +0000
Subject: [PATCH 05/16] Suppress false error message on PPPoE disconnect
Once the kernel handles PPPoE PADTs correctly[1], a PADT triggered
disconnect will result in EALREADY when pppd tries to clear the session ID.
Simply ignore the error if, and only if, the error is EALREADY
[1] https://patchwork.ozlabs.org/patch/444717/
Signed-off-by: Simon Farnsworth <simon@farnz.org.uk>
---
pppd/plugins/rp-pppoe/plugin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c
index a8c2bb4f4a6a..da50cdf2b9d3 100644
--- a/pppd/plugins/rp-pppoe/plugin.c
+++ b/pppd/plugins/rp-pppoe/plugin.c
@@ -270,7 +270,7 @@ PPPOEDisconnectDevice(void)
memcpy(sp.sa_addr.pppoe.dev, conn->ifName, IFNAMSIZ);
memcpy(sp.sa_addr.pppoe.remote, conn->peerEth, ETH_ALEN);
if (connect(conn->sessionSocket, (struct sockaddr *) &sp,
- sizeof(struct sockaddr_pppox)) < 0)
+ sizeof(struct sockaddr_pppox)) < 0 && errno != EALREADY)
error("Failed to disconnect PPPoE socket: %d %m", errno);
close(conn->sessionSocket);
/* don't send PADT?? */
--
2.15.1
From cd2c14f998c57bbe6a01dc5854f2763c0d7f31fb Mon Sep 17 00:00:00 2001
From: Simon Farnsworth <simon@farnz.org.uk>
Date: Sun, 1 Mar 2015 11:53:58 +0000
Subject: [PATCH 06/16] Send PADT on PPPoE disconnect
Once we've terminated the PPP session, there is no chance of a PPP layer
disconnect. Some PPPoE relays don't detect the PPP session going down, and
depend on a long timeout or a PPPoE PADT to terminate the session.
Send a PADT on disconnect to work around these buggy relays.
Signed-off-by: Simon Farnsworth <simon@farnz.org.uk>
---
pppd/plugins/rp-pppoe/plugin.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/pppd/plugins/rp-pppoe/plugin.c
+++ b/pppd/plugins/rp-pppoe/plugin.c
@@ -273,9 +273,10 @@
sizeof(struct sockaddr_pppox)) < 0 && errno != EALREADY)
error("Failed to disconnect PPPoE socket: %d %m", errno);
close(conn->sessionSocket);
- /* don't send PADT?? */
- if (conn->discoverySocket >= 0)
+ if (conn->discoverySocket >= 0) {
+ sendPADT(conn, NULL);
close(conn->discoverySocket);
+ }
}
static void
From fe149de624f96629a7f46732055d8f718c74b856 Mon Sep 17 00:00:00 2001
From: Paul Mackerras <paulus@samba.org>
Date: Fri, 14 Aug 2015 17:56:26 +1000
Subject: [PATCH 07/16] pppd: ipxcp: Prevent buffer overrun on remote router
name
This fixes an if condition to prevent a possible 1-byte overrun
on ipxcp_hisoptions[0].name.
Reported-by: "Sabas Rosales, Blanca E" <blanca.e.sabas.rosales@intel.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
---
pppd/ipxcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pppd/ipxcp.c b/pppd/ipxcp.c
index 7b2343e15537..aaff10f76200 100644
--- a/pppd/ipxcp.c
+++ b/pppd/ipxcp.c
@@ -1194,7 +1194,7 @@ ipxcp_reqci(f, inp, len, reject_if_disagree)
case IPX_ROUTER_NAME:
if (cilen >= CILEN_NAME) {
int name_size = cilen - CILEN_NAME;
- if (name_size > sizeof (ho->name))
+ if (name_size >= sizeof (ho->name))
name_size = sizeof (ho->name) - 1;
memset (ho->name, 0, sizeof (ho->name));
memcpy (ho->name, p, name_size);
--
2.15.1
From 234edab99a6bb250cc9ecd384cca27b0c8b475ce Mon Sep 17 00:00:00 2001
From: Sylvain Rochet <gradator@gradator.net>
Date: Wed, 25 Mar 2015 00:25:18 +0100
Subject: [PATCH 08/16] pppd: Fix ccp_options.mppe type
This corrects the type of ccp_options.mppe; it is actually a bitfield of
MPPE_OPT_* and not a boolean.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
pppd/ccp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pppd/ccp.h b/pppd/ccp.h
index 6f4a2fee0a2c..76446db007c0 100644
--- a/pppd/ccp.h
+++ b/pppd/ccp.h
@@ -37,7 +37,7 @@ typedef struct ccp_options {
bool predictor_2; /* do Predictor-2? */
bool deflate_correct; /* use correct code for deflate? */
bool deflate_draft; /* use draft RFC code for deflate? */
- bool mppe; /* do MPPE? */
+ u_char mppe; /* MPPE bitfield */
u_short bsd_bits; /* # bits/code for BSD Compress */
u_short deflate_size; /* lg(window size) for Deflate */
short method; /* code for chosen compression method */
--
2.15.1
From 094cb8ae4c61db225e67fedadb4964f846dd0c27 Mon Sep 17 00:00:00 2001
From: Sylvain Rochet <gradator@gradator.net>
Date: Tue, 24 Mar 2015 21:21:40 +0100
Subject: [PATCH 09/16] pppd: Fix ccp_cilen calculated size if both
deflate_correct and deflate_draft are enabled
This fixes a bug where ccp_cilen() will return 4 bytes less than
necessary for the addci buffer if both deflate_correct and
deflate_draft are enabled.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
pppd/ccp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pppd/ccp.c b/pppd/ccp.c
index 5814f358eb44..7d7922afcfc0 100644
--- a/pppd/ccp.c
+++ b/pppd/ccp.c
@@ -676,7 +676,8 @@ ccp_cilen(f)
ccp_options *go = &ccp_gotoptions[f->unit];
return (go->bsd_compress? CILEN_BSD_COMPRESS: 0)
- + (go->deflate? CILEN_DEFLATE: 0)
+ + (go->deflate && go->deflate_correct? CILEN_DEFLATE: 0)
+ + (go->deflate && go->deflate_draft? CILEN_DEFLATE: 0)
+ (go->predictor_1? CILEN_PREDICTOR_1: 0)
+ (go->predictor_2? CILEN_PREDICTOR_2: 0)
+ (go->mppe? CILEN_MPPE: 0);
--
2.15.1
From f831f27c309fb2f4dfca3336a9f144993e02c225 Mon Sep 17 00:00:00 2001
From: YASUOKA Masahiko <yasuoka@yasuoka.net>
Date: Wed, 16 Mar 2016 13:39:19 +0900
Subject: [PATCH 10/16] Fix a typo in comment. Diff from Yuuichi Someya.
---
pppd/fsm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pppd/fsm.c b/pppd/fsm.c
index c200cc3a8438..e9bd34f0e8f4 100644
--- a/pppd/fsm.c
+++ b/pppd/fsm.c
@@ -468,7 +468,7 @@ fsm_rconfreq(f, id, inp, len)
f->nakloops = 0;
} else {
- /* we sent CONFACK or CONFREJ */
+ /* we sent CONFNAK or CONFREJ */
if (f->state != ACKRCVD)
f->state = REQSENT;
if( code == CONFNAK )
--
2.15.1
From 2ecc3c7ce01d01e514c8a514b16c45aec1d5613f Mon Sep 17 00:00:00 2001
From: Dmitry Deshevoy <mityada@gmail.com>
Date: Thu, 31 Mar 2016 23:39:32 +0400
Subject: [PATCH 11/16] plog: count only relevant lines from syslog
Closes paulusmack/ppp#42
---
scripts/plog | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/plog b/scripts/plog
index 84d2c7340cc6..7cb53346413d 100644
--- a/scripts/plog
+++ b/scripts/plog
@@ -3,5 +3,5 @@
if [ -s /var/log/ppp.log ]; then
exec tail "$@" /var/log/ppp.log
else
- exec tail "$@" /var/log/syslog | grep ' \(pppd\|chat\)\['
+ exec grep ' \(pppd\|chat\)\[' /var/log/syslog | tail "$@"
fi
--
2.15.1
From 56a4760236ee0a606075404c5704801feffa646c Mon Sep 17 00:00:00 2001
From: Stefan Nickl <Stefan.Nickl@gmail.com>
Date: Wed, 10 Aug 2016 21:32:21 +0200
Subject: [PATCH 12/16] Change include from sys/errno.h to errno.h
According to POSIX, the canonical location for errno.h is on the top level.
Signed-off-by: Stefan Nickl <Stefan.Nickl@gmail.com>
---
pppd/sys-linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
index b4a435d2a993..20b42ac3e80c 100644
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -73,12 +73,12 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
-#include <sys/errno.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/utsname.h>
#include <sys/sysmacros.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
--
2.15.1
Description: allow use of arbitrary interface names
From bbcdc4366bbee6c3f4e1ddda31e4eec8c1b3ccc2 Mon Sep 17 00:00:00 2001
From: Paul Mackerras <paulus@samba.org>
Date: Tue, 23 Aug 2016 16:10:21 +1000
Subject: [PATCH 13/16] pppd: allow use of arbitrary interface names
This is a modified version of a patch from openSUSE that enables PPP interfaces
to be called arbitrary names, rather than simply pppX where X is the unit
......@@ -10,11 +13,22 @@ The modifications from the stock openSUSE patch are:
- clarify the pppd.8 manpage additions
- patch pppstats/pppstats.c to query renamed interfaces without complaint
Origin: vendor, https://build.opensuse.org/source/network/ppp/ppp-2.4.2-ifname.diff?rev=7a0fdeff0b29437dd7f4581c95c7255a
Origin: SUSE
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=458646
Forwarded: no
Reviewed-by: Chris Boot <bootc@debian.org>
Last-Update: 2014-01-12
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
---
pppd/main.c | 16 ++++++----------
pppd/options.c | 5 +++++
pppd/pppd.8 | 8 +++++++-
pppd/pppd.h | 11 +++++++++++
pppd/sys-linux.c | 15 +++++++++++++++
pppstats/pppstats.c | 12 ++++++------
6 files changed, 50 insertions(+), 17 deletions(-)
diff --git a/pppd/main.c b/pppd/main.c
index 6d50d1bac1d9..f1986ed68d0b 100644
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -124,7 +124,7 @@
......@@ -40,7 +54,7 @@ Last-Update: 2014-01-12
int
main(argc, argv)
int argc;
@@ -740,8 +733,11 @@ void
@@ -737,8 +730,11 @@ void
set_ifunit(iskey)
int iskey;
{
......@@ -54,17 +68,19 @@ Last-Update: 2014-01-12
script_setenv("IFNAME", ifname, iskey);
if (iskey) {
create_pidfile(getpid()); /* write pid to file */
diff --git a/pppd/options.c b/pppd/options.c
index c06a2b4ad8ed..177488ca6813 100644
--- a/pppd/options.c
+++ b/pppd/options.c
@@ -116,6 +116,7 @@ int connect_delay = 1000; /* wait this m
@@ -114,6 +114,7 @@ char linkname[MAXPATHLEN]; /* logical name for link */
bool tune_kernel; /* may alter kernel settings */
int connect_delay = 1000; /* wait this many ms after connect script */
int req_unit = -1; /* requested interface unit */
char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
char path_ipdown[MAXPATHLEN];/* pathname of ip-down script */
+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 */
@@ -285,6 +286,10 @@ option_t general_options[] = {
@@ -284,6 +285,10 @@ option_t general_options[] = {
"PPP interface unit number to use if possible",
OPT_PRIO | OPT_LLIMIT, 0, 0 },
......@@ -75,9 +91,11 @@ Last-Update: 2014-01-12
{ "dump", o_bool, &dump_options,
"Print out option values after parsing all options", 1 },
{ "dryrun", o_bool, &dryrun,
diff --git a/pppd/pppd.8 b/pppd/pppd.8
index c508d277df3a..06e945fce998 100644
--- a/pppd/pppd.8
+++ b/pppd/pppd.8
@@ -1093,7 +1093,13 @@ under Linux and FreeBSD 2.2.8 and later.
@@ -1079,7 +1079,13 @@ under Linux and FreeBSD 2.2.8 and later.
.TP
.B unit \fInum
Sets the ppp unit number (for a ppp0 or ppp1 etc interface name) for outbound
......@@ -92,6 +110,8 @@ Last-Update: 2014-01-12
.TP
.B unset \fIname
Remove a variable from the environment variable for scripts that are
diff --git a/pppd/pppd.h b/pppd/pppd.h
index 247fa153739b..1a1bf0b99582 100644
--- a/pppd/pppd.h
+++ b/pppd/pppd.h
@@ -80,6 +80,16 @@
......@@ -111,17 +131,19 @@ Last-Update: 2014-01-12
/*
* Option descriptor structure.
@@ -319,6 +329,7 @@ extern int max_data_rate; /* max bytes/s
@@ -318,6 +328,7 @@ extern bool tune_kernel; /* May alter kernel settings as necessary */
extern int connect_delay; /* Time to delay after connect script */
extern int max_data_rate; /* max bytes/sec through charshunt */
extern int req_unit; /* interface unit number to use */
extern char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
extern char path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */
+extern char req_ifname[MAXIFNAMELEN]; /* interface name to use */
extern bool multilink; /* enable multilink operation */
extern bool noendpoint; /* don't send or accept endpt. discrim. */
extern char *bundle_name; /* bundle name for multilink */
diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
index b4a435d2a993..b832031f7e26 100644
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -645,6 +645,21 @@ static int make_ppp_unit()
@@ -643,6 +643,21 @@ static int make_ppp_unit()
}
if (x < 0)
error("Couldn't create new ppp unit: %m");
......@@ -143,9 +165,11 @@ Last-Update: 2014-01-12
return x;
}
diff --git a/pppstats/pppstats.c b/pppstats/pppstats.c
index 6367988eb96b..46cb9c24942b 100644
--- a/pppstats/pppstats.c
+++ b/pppstats/pppstats.c
@@ -88,7 +88,6 @@ int aflag; /* print absolute values, n
@@ -88,7 +88,6 @@ int aflag; /* print absolute values, not deltas */
int dflag; /* print data rates, not bytes */
int interval, count;
int infinite;
......@@ -185,3 +209,6 @@ Last-Update: 2014-01-12
#ifdef __osf__
dev = "/dev/streams/ppp";
#else
--
2.15.1
From 66ae569f1c6fb12df8a463c8beb9afc0c7e5f7f0 Mon Sep 17 00:00:00 2001
From: George Burgess IV <george@gbiv.net>
Date: Fri, 9 Sep 2016 17:36:54 -0700
Subject: [PATCH 14/16] pppd: Remove unused declaration of ttyname.
Signed-off-by: George Burgess IV <george@gbiv.net>
---
pppd/main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/pppd/main.c b/pppd/main.c
index 6d50d1bac1d9..aef9e8477592 100644
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -257,7 +257,6 @@ static void cleanup_db __P((void));
static void handle_events __P((void));
void print_link_stats __P((void));
-extern char *ttyname __P((int));
extern char *getlogin __P((void));
int main __P((int, char *[]));
--
2.15.1
From b7b97dea6eb042fae0dfaca39cbb190411e5fd31 Mon Sep 17 00:00:00 2001
From: Stefan Nickl <Stefan.Nickl@gmail.com>
Date: Wed, 10 Aug 2016 16:52:12 +0200
Subject: [PATCH 15/16] pppd: Provide error() implementation in pppoe-discovery
The pppoe-discovery program calls error() from the CHECK_ROOM macro
defined in pppoe.h. Since pppoe-discovery is a standalone program not
linked with the rest of pppd, the only way this could build is by
linking to glibc's proprietary error(3) function instead of the function
of the same name (but with different arguments) defined in pppd/utils.c.
So with glibc this builds, but will probably crash when the assertion is
triggered. As the assertion is unlikely to fail, nobody has noticed.
The build however fails with musl libc or uClibc since they don't
provide the doppelganger.
Signed-off-by: Stefan Nickl <Stefan.Nickl@gmail.com>
---
pppd/plugins/rp-pppoe/pppoe-discovery.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c
index 3d3bf4eecc81..55037dffb023 100644
--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
@@ -9,6 +9,7 @@
*
*/
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -55,6 +56,14 @@ void die(int status)
exit(status);
}
+void error(char *fmt, ...)
+{
+ va_list pvar;
+ va_start(pvar, fmt);
+ vfprintf(stderr, fmt, pvar);
+ va_end(pvar);
+}
+
/* Initialize frame types to RFC 2516 values. Some broken peers apparently
use different frame types... sigh... */
--
2.15.1
From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Mon, 9 Jan 2017 13:34:23 +0000
Subject: [PATCH 16/16] pppoe: include netinet/in.h before linux/in.h
This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
included before <linux/in.h> otherwise the earlier, unaware of the latter,
tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
alone anymore, since it pulls the headers in the wrong order, so we better
include <netinet/in.h> early.
---
pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
index 9ab2eee3914c..c4aaa6e68856 100644
--- a/pppd/plugins/rp-pppoe/pppoe.h
+++ b/pppd/plugins/rp-pppoe/pppoe.h
@@ -47,6 +47,10 @@
#include <sys/socket.h>
#endif
+/* This has to be included before Linux 4.8's linux/in.h
+ * gets dragged in. */
+#include <netinet/in.h>
+
/* Ugly header files on some Linux boxes... */
#if defined(HAVE_LINUX_IF_H)
#include <linux/if.h>
@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
#include <linux/if_ether.h>
#endif
-#include <netinet/in.h>
-
#ifdef HAVE_NETINET_IF_ETHER_H
#include <sys/types.h>
@@ -98,7 +100,6 @@ typedef unsigned long UINT32_t;
#endif
-
/* Ethernet frame types according to RFC 2516 */
#define ETH_PPPOE_DISCOVERY 0x8863
#define ETH_PPPOE_SESSION 0x8864
--
2.15.1
--- a/pppd/ipcp.c
+++ b/pppd/ipcp.c
@@ -1951,7 +1951,7 @@ ipcp_up(f)
@@ -1984,7 +1984,7 @@
*/
if (ipcp_script_state == s_down && ipcp_script_pid == 0) {
ipcp_script_state = s_up;
......@@ -9,7 +9,7 @@
}
}
@@ -2001,7 +2001,7 @@ ipcp_down(f)
@@ -2034,7 +2034,7 @@
/* Execute the ip-down script */
if (ipcp_script_state == s_up && ipcp_script_pid == 0) {
ipcp_script_state = s_down;
......@@ -18,7 +18,7 @@
}
}
@@ -2064,13 +2064,13 @@ ipcp_script_done(arg)
@@ -2097,13 +2097,13 @@
case s_up:
if (ipcp_fsm[0].state != OPENED) {
ipcp_script_state = s_down;
......@@ -36,7 +36,7 @@
}
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -316,6 +316,9 @@ main(argc, argv)
@@ -308,6 +308,9 @@
struct protent *protp;
char numbuf[16];
......@@ -48,16 +48,16 @@
--- a/pppd/options.c
+++ b/pppd/options.c
@@ -114,6 +114,8 @@ char linkname[MAXPATHLEN]; /* logical na
@@ -114,6 +114,8 @@
bool tune_kernel; /* may alter kernel settings */
int connect_delay = 1000; /* wait this many ms after connect script */
int req_unit = -1; /* requested interface unit */
+char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
+char path_ipdown[MAXPATHLEN];/* pathname of ip-down script */
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 */
@@ -299,6 +301,13 @@ option_t general_options[] = {
@@ -304,6 +306,13 @@
"Unset user environment variable",
OPT_A2PRINTER | OPT_NOPRINT, (void *)user_unsetprint },
......@@ -73,12 +73,12 @@
"Enable multilink operation", OPT_PRIO | 1 },
--- a/pppd/pppd.h
+++ b/pppd/pppd.h
@@ -317,6 +317,8 @@ extern bool tune_kernel; /* May alter ke
@@ -328,6 +328,8 @@
extern int connect_delay; /* Time to delay after connect script */
extern int max_data_rate; /* max bytes/sec through charshunt */
extern int req_unit; /* interface unit number to use */
+extern char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
+extern char path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */
extern char req_ifname[MAXIFNAMELEN]; /* interface name to use */
extern bool multilink; /* enable multilink operation */
extern bool noendpoint; /* don't send or accept endpt. discrim. */
extern char *bundle_name; /* bundle name for multilink */
This diff is collapsed.
......@@ -7,7 +7,7 @@ packaging system if required.
--- a/chat/Makefile.linux
+++ b/chat/Makefile.linux
@@ -12,20 +12,21 @@ CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF
@@ -12,20 +12,21 @@
COPTS= -O2 -g -pipe
CFLAGS= $(COPTS) $(CDEFS)
......@@ -42,8 +42,8 @@ packaging system if required.
INSTALL = install
DESTDIR = $(INSTROOT)@DESTDIR@
@@ -23,7 +23,7 @@ all: $(PLUGINS)
for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
@@ -30,7 +30,7 @@
for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all || exit $$?; done
%.so: %.c
- $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
......@@ -62,7 +62,7 @@ packaging system if required.
INSTALL = install
#***********************************************************************
@@ -33,7 +33,7 @@ endif
@@ -33,7 +33,7 @@
all: $(PLUGIN)
$(PLUGIN): $(PLUGIN_OBJS)
......@@ -82,7 +82,7 @@ packaging system if required.
INSTALL = install
#***********************************************************************
@@ -16,7 +16,7 @@ PLUGINS := pppol2tp.so openl2tp.so
@@ -16,7 +16,7 @@
all: $(PLUGINS)
%.so: %.o
......@@ -93,7 +93,7 @@ packaging system if required.
$(INSTALL) -d -m 755 $(LIBDIR)
--- a/pppd/plugins/radius/Makefile.linux
+++ b/pppd/plugins/radius/Makefile.linux
@@ -12,7 +12,9 @@ VERSION = $(shell awk -F '"' '/VERSION/
@@ -12,7 +12,9 @@
INSTALL = install
PLUGIN=radius.so radattr.so radrealms.so
......@@ -104,7 +104,7 @@ packaging system if required.
# Uncomment the next line to include support for Microsoft's
# MS-CHAP authentication protocol.
@@ -36,20 +38,20 @@ all: $(PLUGIN)
@@ -36,20 +38,20 @@
install: all
$(INSTALL) -d -m 755 $(LIBDIR)
......@@ -133,7 +133,7 @@ packaging system if required.
clientid.o sendserver.o lock.o util.o md5.o
--- a/pppd/plugins/rp-pppoe/Makefile.linux
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
@@ -27,10 +27,12 @@ RP_VERSION=3.8p
@@ -27,10 +27,12 @@
COPTS=-O2 -g
CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
......@@ -147,7 +147,7 @@ packaging system if required.
pppoe-discovery.o: pppoe-discovery.c
$(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
@@ -39,13 +41,13 @@ debug.o: debug.c
@@ -39,13 +41,13 @@
$(CC) $(CFLAGS) -c -o debug.o debug.c
rp-pppoe.so: plugin.o discovery.o if.o common.o
......@@ -166,7 +166,7 @@ packaging system if required.
rm -f *.o *.so pppoe-discovery
--- a/pppstats/Makefile.linux
+++ b/pppstats/Makefile.linux
@@ -10,23 +10,24 @@ PPPSTATSRCS = pppstats.c
@@ -10,23 +10,24 @@
PPPSTATOBJS = pppstats.o
#CC = gcc
......@@ -196,7 +196,7 @@ packaging system if required.
rm -f pppstats *~ #* core
--- a/pppdump/Makefile.linux
+++ b/pppdump/Makefile.linux
@@ -2,7 +2,10 @@ DESTDIR = $(INSTROOT)@DESTDIR@
@@ -2,7 +2,10 @@
BINDIR = $(DESTDIR)/sbin
MANDIR = $(DESTDIR)/share/man/man8
......@@ -208,7 +208,7 @@ packaging system if required.
OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
INSTALL= install
@@ -10,12 +13,12 @@ INSTALL= install
@@ -10,12 +13,12 @@
all: pppdump
pppdump: $(OBJS)
......@@ -225,7 +225,7 @@ packaging system if required.
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -83,6 +83,7 @@ INCLUDE_DIRS= -I../include
@@ -83,6 +83,7 @@
COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
......@@ -233,7 +233,7 @@ packaging system if required.
ifdef CHAPMS
CFLAGS += -DCHAPMS=1
@@ -102,7 +103,7 @@ ifdef USE_SRP
@@ -102,7 +103,7 @@
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
TARGETS += srp-entry
......@@ -242,7 +242,7 @@ packaging system if required.
MANPAGES += srp-entry.8
EXTRACLEAN += srp-entry.o
NEEDDES=y
@@ -208,13 +209,13 @@ all: $(TARGETS)
@@ -208,13 +209,13 @@
install: pppd
mkdir -p $(BINDIR) $(MANDIR)
$(EXTRAINSTALL)
......
This diff is collapsed.
This diff is collapsed.
# merged in upstream Git, but not yet released
0001-abort-on-errors-in-subdir-builds.patch
#0002-pppd-add-support-for-defaultroute-metric-option.patch
0003-scripts-Avoid-killing-wrong-pppd.patch
0004-pppd-Fix-sign-extension-when-displaying-bytes-in-oct.patch
0005-Suppress-false-error-message-on-PPPoE-disconnect.patch
0006-Send-PADT-on-PPPoE-disconnect.patch
0007-pppd-ipxcp-Prevent-buffer-overrun-on-remote-router-n.patch
0008-pppd-Fix-ccp_options.mppe-type.patch
0009-pppd-Fix-ccp_cilen-calculated-size-if-both-deflate_c.patch
0010-Fix-a-typo-in-comment.-Diff-from-Yuuichi-Someya.patch
0011-plog-count-only-relevant-lines-from-syslog.patch
0012-Change-include-from-sys-errno.h-to-errno.h.patch
0013-pppd-allow-use-of-arbitrary-interface-names.patch
0014-pppd-Remove-unused-declaration-of-ttyname.patch
0015-pppd-Provide-error-implementation-in-pppoe-discovery.patch
0016-pppoe-include-netinet-in.h-before-linux-in.h.patch
# to be merged upstream
adaptive_echos
makefiles_cleanup
......@@ -11,6 +29,9 @@ pppoe_noads
readable_connerrs
radius-config.c-unkown-typo
# github pull requests
pr-28-pppoe-custom-host-uniq-tag.patch
# not ready to be merged
011_scripts_redialer.diff
cifdefroute.dif
......@@ -23,7 +44,6 @@ ppp-2.4.2-stripMSdomain
setenv_call_file
ipv6-accept-remote
ppp-2.4.2-ifname.diff
ppp-2.4.4-strncatfix.patch
# debian-specific
......@@ -34,3 +54,5 @@ zzz_config
secure-card-interpreter-fix
rc_mksid-no-buffer-overflow
pppd-soname-hack.patch
eaptls-mppe.patch
replace-vendored-hash-functions.patch
debian/extra/udeb/ip-up etc/ppp/
debian/extra/udeb/options etc/ppp/
debian/extra/udeb/post-base-installer.d/* usr/lib/post-base-installer.d
debian/tmp-udeb/usr/lib/pppd/ usr/lib/
debian/tmp-udeb/usr/sbin/ usr/
......@@ -3,7 +3,7 @@ set -e
. /usr/share/debconf/confmodule
INTERFACES=$(grep : /proc/net/dev | cut -d':' -f1 | sort | sed -e 's/ *//' | grep -E '^(eth|nas|tap|nic-)')
INTERFACES=$(grep : /proc/net/dev | cut -d':' -f1 | sort | sed -e 's/ *//' | grep -E '^(en|eth|nas|tap|nic-)')
db_get ppp/interface
PPPOE="$RET"
db_capb backup
......
etc/ppp/peers/
etc/chatscripts/
etc/ppp/ip-up.d/
etc/ppp/ip-down.d/
etc/ppp/ipv6-up.d/
etc/ppp/ip-up.d/
etc/ppp/ipv6-down.d/
usr/share/ppp/
etc/ppp/ipv6-up.d/
etc/ppp/peers/
usr/bin/
usr/share/ppp/
FAQ
README
SETUP
PLUGINS
README.cbcp
README
README.MPPE
README.MSCHAP80
README.MSCHAP81
README.cbcp
README.pppoe
README.pppol2tp
README.pwfd
SETUP
debian/extra/README.STATIC-IP
debian/extra/README.win9x
debian/extra/defaultroute
debian/extra/bash_completion/poff usr/share/bash-completion/completions/
debian/extra/bash_completion/pon usr/share/bash-completion/completions/
debian/extra/chap-secrets usr/share/ppp/
debian/extra/chatscripts/ etc/
debian/extra/ip-down.d/ etc/ppp/
debian/extra/ip-down etc/ppp/
debian/extra/ip-up.d/ etc/ppp/
debian/extra/ip-down.d/ etc/ppp/
debian/extra/ip-up etc/ppp/
debian/extra/ip-up.d/ etc/ppp/
debian/extra/ipv6-down etc/ppp/
debian/extra/ipv6-up etc/ppp/
debian/extra/options etc/ppp/
debian/extra/pap-secrets usr/share/ppp/
debian/extra/plog usr/bin/
debian/extra/poff usr/bin/
debian/extra/pon usr/bin/
debian/extra/bash_completion/pon usr/share/bash-completion/completions/
debian/extra/chap-secrets usr/share/ppp/
debian/extra/pap-secrets usr/share/ppp/
debian/extra/provider.chatscript usr/share/ppp/
debian/extra/provider.peer usr/share/ppp/
debian/tmp-ppp/usr/lib/pppd/* usr/lib/pppd/
debian/tmp-ppp/usr/sbin/* usr/sbin/
debian/tmp-ppp/usr/share/man/* usr/share/man/
usr/share/man/man1/pon.1 usr/share/man/man1/poff.1
usr/share/man/man1/pon.1 usr/share/man/man1/plog.1
usr/share/man/man1/pon.1 usr/share/man/man1/poff.1
# Has been moved to /usr/share/bash-completion/completions/pon
rm_conffile /etc/bash_completion.d/pon 2.4.7-1+2~
......@@ -14,16 +14,6 @@ pppd.so.2.4.7 ppp #MINVER#
DesSetkey@Base 2.4.7-1+2~
GenerateAuthenticatorResponse@Base 2.4.7-1+2~
GetMask@Base 2.4.7-1+2~
MD4Final@Base 2.4.7-1+2~
MD4Init@Base 2.4.7-1+2~
MD4Print@Base 2.4.7-1+2~
MD4Update@Base 2.4.7-1+2~
MD5_Final@Base 2.4.7-1+2~
MD5_Init@Base 2.4.7-1+2~
MD5_Update@Base 2.4.7-1+2~
SHA1_Final@Base 2.4.7-1+2~
SHA1_Init@Base 2.4.7-1+2~
SHA1_Update@Base 2.4.7-1+2~
active_filter@Base 2.4.7-1+2~
add_fd@Base 2.4.7-1+2~
add_notifier@Base 2.4.7-1+2~
......@@ -51,6 +41,7 @@ pppd.so.2.4.7 ppp #MINVER#
bundle_id@Base 2.4.7-1+2~
bundle_name@Base 2.4.7-1+2~
bundle_terminating@Base 2.4.7-1+2~
cacert_file@Base 2.4.7-2+1~
callback_script@Base 2.4.7-1+2~
cbcp@Base 2.4.7-1+2~
cbcp_codenames@Base 2.4.7-1+2~
......@@ -65,6 +56,7 @@ pppd.so.2.4.7 ppp #MINVER#
ccp_protent@Base 2.4.7-1+2~
ccp_test@Base 2.4.7-1+2~
ccp_wantoptions@Base 2.4.7-1+2~
cert_file@Base 2.4.7-2+1~
cfg_bundle@Base 2.4.7-1+2~
chap_auth_peer@Base 2.4.7-1+2~
chap_auth_with_peer@Base 2.4.7-1+2~
......@@ -97,6 +89,8 @@ pppd.so.2.4.7 ppp #MINVER#
connect_script@Base 2.4.7-1+2~
connect_tty@Base 2.4.7-1+2~
continue_networks@Base 2.4.7-1+2~
crl_dir@Base 2.4.7-2+1~
crl_file@Base 2.4.7-2+1~
crtscts@Base 2.4.7-1+2~
cryptpap@Base 2.4.7-1+2~
current_option@Base 2.4.7-1+2~
......@@ -134,6 +128,18 @@ pppd.so.2.4.7 ppp #MINVER#
eap_authwithpeer@Base 2.4.7-1+2~
eap_protent@Base 2.4.7-1+2~
eap_states@Base 2.4.7-1+2~
eaptls_free_session@Base 2.4.7-2+1~
eaptls_gen_mppe_keys@Base 2.4.7-2+1~
eaptls_get_mtu@Base 2.4.7-2+1~
eaptls_init_ssl@Base 2.4.7-2+1~
eaptls_init_ssl_client@Base 2.4.7-2+1~
eaptls_init_ssl_server@Base 2.4.7-2+1~
eaptls_passwd_hook@Base 2.4.7-2+1~
eaptls_receive@Base 2.4.7-2+1~
eaptls_retransmit@Base 2.4.7-2+1~
eaptls_send@Base 2.4.7-2+1~
eaptls_ssl_load_config@Base 2.4.7-2+1~
eaptls_ssl_load_engine@Base 2.4.7-2+1~
ecp_allowoptions@Base 2.4.7-1+2~
ecp_fsm@Base 2.4.7-1+2~
ecp_gotoptions@Base 2.4.7-1+2~
......@@ -172,6 +178,8 @@ pppd.so.2.4.7 ppp #MINVER#
general_options@Base 2.4.7-1+2~
generic_disestablish_ppp@Base 2.4.7-1+2~
generic_establish_ppp@Base 2.4.7-1+2~
get_X509_from_file@Base 2.4.7-2+1~
get_eaptls_secret@Base 2.4.7-2+1~
get_first_ethernet@Base 2.4.7-1+2~
get_host_seed@Base 2.4.7-1+2~
get_idle_time@Base 2.4.7-1+2~
......@@ -265,6 +273,7 @@ pppd.so.2.4.7 ppp #MINVER#
locked@Base 2.4.7-1+2~
lockflag@Base 2.4.7-1+2~
log_default@Base 2.4.7-1+2~
log_ssl_errors@Base 2.4.7-2+1~
log_to_fd@Base 2.4.7-1+2~
loop_chars@Base 2.4.7-1+2~
loop_frame@Base 2.4.7-1+2~
......@@ -293,6 +302,7 @@ pppd.so.2.4.7 ppp #MINVER#
multilink_join_hook@Base 2.4.7-1+2~
multilink_master@Base 2.4.7-1+2~
need_holdoff@Base 2.4.7-1+2~
need_peer_eap@Base 2.4.7-2+1~
netif_get_mtu@Base 2.4.7-1+2~
netif_set_mtu@Base 2.4.7-1+2~
netmask@Base 2.4.7-1+2~
......@@ -335,6 +345,7 @@ pppd.so.2.4.7 ppp #MINVER#
parse_dotted_ip@Base 2.4.7-1+2~
pass_filter@Base 2.4.7-1+2~
passwd@Base 2.4.7-1+2~
password_callback@Base 2.4.7-2+1~
path_ipdown@Base 2.4.7-1+2~
path_ipup@Base 2.4.7-1+2~
peer_authname@Base 2.4.7-1+2~
......@@ -358,6 +369,7 @@ pppd.so.2.4.7 ppp #MINVER#
print_string@Base 2.4.7-1+2~
privileged@Base 2.4.7-1+2~
privileged_option@Base 2.4.7-1+2~
privkey_file@Base 2.4.7-2+1~
privopen@Base 2.4.7-1+2~
progname@Base 2.4.7-1+2~
protocol_list@Base 2.4.7-1+2~
......@@ -418,6 +430,9 @@ pppd.so.2.4.7 ppp #MINVER#
snoop_recv_hook@Base 2.4.7-1+2~
snoop_send_hook@Base 2.4.7-1+2~
speeds@Base 2.4.7-1+2~
ssl_cmp_certs@Base 2.4.7-2+1~
ssl_msg_callback@Base 2.4.7-2+1~
ssl_verify_callback@Base 2.4.7-2+1~
start_link@Base 2.4.7-1+2~
start_networks@Base 2.4.7-1+2~
status@Base 2.4.7-1+2~
......
......@@ -7,12 +7,9 @@
# Activate full hardening build flags
export DEB_BUILD_MAINT_OPTIONS := hardening=+all
## http://wiki.debian.org/onlyjob/get-orig-source
PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG = $(shell dpkg-parsechangelog -l$(PKD)/changelog --show-field=Source)
VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog --show-field=Version | \
perl -ne 'print $$1 if m{^(?:\d+:)?(\d.*)(?:\-\d+.*)$$};')
##
PKD := $(abspath $(dir $(MAKEFILE_LIST)))
include /usr/share/dpkg/default.mk
DIR_PPP := $(CURDIR)/debian/ppp
DIR_PPP_DEV := $(CURDIR)/debian/ppp-dev
......@@ -22,32 +19,27 @@ TMP_UDEB := $(CURDIR)/debian/tmp-udeb
PPP_PLUGIN_ABI := $(shell awk -F '"' '/VERSION/ { print $$2; }' \
$(CURDIR)/pppd/patchlevel.h)
VERSION_UPSTREAM := $(shell dpkg-parsechangelog -l$(PKD)/changelog \
--show-field=Version | \
perl -ne 'print $$1 if m{^(?:\d+:)?(\d.*)(?:\-\d+.*)$$};')
VERSION_DEBIAN := $(shell dpkg-parsechangelog -l$(PKD)/changelog \
--show-field=Version | \
VERSION_DEBIAN := $(shell echo '$(DEB_VERSION)' | \
perl -ne 'print $$1 if m{^(?:\d+:)?(?:\d.*)\-(\d+.*)$$};')
VERSION_ABI_PART := $(shell echo "$(VERSION_DEBIAN)" | \
perl -ne 'print $$1 if m{^(^\d+)\+};')
UDEB_MAKEOPTS := \
CHAPMS= USE_CRYPT= NO_CRYPT_HACK=1 MPPE= \
FILTER= HAVE_MULTILINK= USE_TDB= \
HAS_SHADOW= USE_PAM= HAVE_INET6= \
CBCP= USE_SRP= MAXOCTETS= USE_BUILTIN_CRYPTO=1
CHAPMS= USE_CRYPT= NO_CRYPT_HACK=1 MPPE= FILTER= HAVE_MULTILINK= \
USE_TDB= HAS_SHADOW= USE_PAM= HAVE_INET6= CBCP= USE_SRP= MAXOCTETS= \
USE_BUILTIN_CRYPTO=1 USE_EAPTLS=
UDEB_PLUGIN_DIRS := pppoatm rp-pppoe
##############################################################################
%:
dh $@ --with systemd
dh $@
override_dh_testdir:
dh_testdir
if [ "$(PPP_PLUGIN_ABI)" != "$(VERSION_UPSTREAM)" ]; then \
if [ "$(PPP_PLUGIN_ABI)" != "$(DEB_VERSION_UPSTREAM)" ]; then \
echo; echo "**********"; \
echo "VERSION in pppd/patchlevel.h must match upstream version."; \
echo "Upstream version is '$(VERSION_UPSTREAM)'"; \
echo "Upstream version is '$(DEB_VERSION_UPSTREAM)'"; \
echo "VERSION is '$(PPP_PLUGIN_ABI)'"; \
echo "Aborting the build."; \
echo "**********"; echo; \
......@@ -114,7 +106,7 @@ override_dh_auto_install-arch:
override_dh_auto_install-indep:
$(MAKE) install-devel DESTDIR=$(DIR_PPP_DEV)/usr/
mkdir -p $(DIR_PPP_DEV)/usr/share/ppp-dev
$(PKD)/gen_substvars_dev $(VERSION_UPSTREAM) $(VERSION_ABI_PART) \
$(PKD)/gen_substvars_dev $(DEB_VERSION_UPSTREAM) $(VERSION_ABI_PART) \
> $(DIR_PPP_DEV)/usr/share/ppp-dev/substvars
override_dh_installchangelogs:
......@@ -160,6 +152,6 @@ override_dh_makeshlibs:
dh_makeshlibs --no-package=ppp
## http://wiki.debian.org/onlyjob/get-orig-source
get-orig-source: $(info I: $(PKG)_$(VER))
get-orig-source: $(info I: $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM))
@echo "# Downloading..."
uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(DEB_VERSION_UPSTREAM) $(PKD)