Skip to content

Commit

Permalink
ppp: update to 2.5.2
Browse files Browse the repository at this point in the history
This is a minor upgrade that mainly fixes some compilation errors
and remove old unused code.

The Makefile has been reorganized. Now all package make parameters
are passed as configure arguments instead of environment variables.
The compilation dependencies remain the same as ppp v2.5.1 and the
package size changes are negligible.

Change log:
https://github.com/ppp-project/ppp/blob/v2.5.2/README#L70

Upstreamed patches:
101-pppd-crypto-fix-build-without-openssl.patch [1]
102-pppd-make-pid-directory-before-create-the-pid-file.patch [2]
103-pppd-crypto-fix-gcc-14-build.patch [3]

[1] ppp-project/ppp@5f6eabd
[2] ppp-project/ppp@734bc04
[3] ppp-project/ppp@ac269db

Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#17477
Signed-off-by: Nick Hainke <[email protected]>
  • Loading branch information
DragonBluep authored and PolynomialDivision committed Jan 5, 2025
1 parent 916af73 commit 381f662
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 174 deletions.
37 changes: 21 additions & 16 deletions package/network/services/ppp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=ppp
PKG_VERSION:=2.5.1
PKG_VERSION:=2.5.2
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ppp-project/ppp
PKG_SOURCE_DATE:=2024-09-18
PKG_SOURCE_VERSION:=d5aeec65752d4a9b3bb46771d0b221c4a4a6539e
PKG_MIRROR_HASH:=b98125933d8160ff3476b053414e787e65a94948c0ecee53f6261cd403ff4b03
PKG_SOURCE_DATE:=2024-12-31
PKG_SOURCE_VERSION:=9f612dc02c34509f062ed63b60bcc7e937e25178
PKG_MIRROR_HASH:=677b71d23b668db986146e13b0c651f2ac506eb4fb244ffba1ff406cbae3511b

PKG_MAINTAINER:=Felix Fietkau <[email protected]>
PKG_LICENSE:=BSD-4-Clause
Expand All @@ -30,17 +30,22 @@ PKG_FIXUP:=autoreconf
PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk
CONFIGURE_VARS += \
enable_eaptls=no \
enable_microsoft_extensions=yes \
enable_peap=no

CONFIGURE_ARGS += \
with_openssl=no \
with_pam=no \
with_pcap=no \
with_srp=no \
with_static_pcap=yes
--disable-cbcp \
--disable-eaptls \
--disable-mslanman \
--disable-openssl-engine \
--disable-peap \
--disable-systemd \
--enable-ipv6cp \
--enable-microsoft-extensions \
--enable-plugins \
--with-atm \
--with-static-pcap \
--without-openssl \
--without-pam \
--without-pcap \
--without-srp

define Package/ppp/Default
SECTION:=net
Expand Down Expand Up @@ -185,8 +190,8 @@ not initiate a session. Can be useful to debug pppoe.
endef

ifeq ($(BUILD_VARIANT),multilink)
CONFIGURE_VARS += \
enable_multilink=yes
CONFIGURE_ARGS += \
--enable-multilink
endif

define Build/InstallDev
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 5 additions & 5 deletions package/network/services/ppp/patches/105-debian_demand.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/pppd/demand.c
+++ b/pppd/demand.c
@@ -40,6 +40,8 @@
@@ -34,6 +34,8 @@
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
Expand All @@ -9,7 +9,7 @@
#include <sys/param.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -47,6 +49,8 @@
@@ -41,6 +43,8 @@
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/socket.h>
Expand All @@ -18,7 +18,7 @@
#ifdef PPP_WITH_FILTER
#include <pcap-bpf.h>
#endif
@@ -223,6 +227,14 @@ loop_chars(unsigned char *p, int n)
@@ -217,6 +221,14 @@ loop_chars(unsigned char *p, int n)
int c, rv;

rv = 0;
Expand All @@ -33,7 +33,7 @@
for (; n > 0; --n) {
c = *p++;
if (c == PPP_FLAG) {
@@ -299,16 +311,100 @@ loop_frame(unsigned char *frame, int len
@@ -293,16 +305,100 @@ loop_frame(unsigned char *frame, int len
* loopback, now that the real serial link is up.
*/
void
Expand Down Expand Up @@ -159,7 +159,7 @@
} else {
--- a/pppd/pppd-private.h
+++ b/pppd/pppd-private.h
@@ -368,7 +368,7 @@ void demand_conf(void); /* config interf
@@ -370,7 +370,7 @@ void demand_conf(void); /* config interf
void demand_block(void); /* set all NPs to queue up packets */
void demand_unblock(void); /* set all NPs to pass packets */
void demand_discard(void); /* set all NPs to discard packets */
Expand Down
4 changes: 2 additions & 2 deletions package/network/services/ppp/patches/204-radius_config.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/pppd/plugins/radius/config.c
+++ b/pppd/plugins/radius/config.c
@@ -381,31 +381,37 @@ static int test_config(char *filename)
@@ -379,31 +379,37 @@ static int test_config(char *filename)
}
#endif

Expand Down Expand Up @@ -40,7 +40,7 @@
}
--- a/pppd/plugins/radius/options.h
+++ b/pppd/plugins/radius/options.h
@@ -31,24 +31,21 @@ typedef struct _option {
@@ -29,24 +29,21 @@ typedef struct _option {
static SERVER acctserver = {0};
static SERVER authserver = {0};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>

--- a/pppd/main.c
+++ b/pppd/main.c
@@ -1152,7 +1152,8 @@ get_input(void)
@@ -1150,7 +1150,8 @@ get_input(void)
}
notice("Modem hangup");
hungup = 1;
- code = EXIT_HANGUP;
+ if (code == EXIT_OK)
+ code = EXIT_HANGUP;
need_holdoff = 0;
lcp_lowerdown(0); /* serial link is no longer available */
link_terminated(0);
return;
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
#
# SunOS provides a version of libpcap that would work, but SunOS has no support for activity filter
AM_CONDITIONAL([PPP_WITH_FILTER], [ test "x${with_pcap}" = "xyes" && test "x${build_sunos}" != "xyes" ])
@@ -359,6 +362,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION
@@ -348,6 +351,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION
With libatm..........: ${with_atm:-no}
With libpam..........: ${with_pam:-no}
With libpcap.........: ${with_pcap:-no}
Expand All @@ -33,7 +33,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
Linker...............: $LD $LDFLAGS $LIBS
--- a/pppd/Makefile.am
+++ b/pppd/Makefile.am
@@ -138,6 +138,12 @@ pppd_LDFLAGS += $(PCAP_LDFLAGS)
@@ -137,6 +137,12 @@ pppd_LDFLAGS += $(PCAP_LDFLAGS)
pppd_LIBS += $(PCAP_LIBS)
endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Signed-off-by: George Kashperko <[email protected]>
2 files changed, 53 insertions(+), 14 deletions(-)
--- a/pppd/multilink.c
+++ b/pppd/multilink.c
@@ -40,6 +40,7 @@
@@ -36,6 +36,7 @@
#include <signal.h>
#include <netinet/in.h>
#include <unistd.h>
+#include <net/if.h>

#include "pppd-private.h"
#include "fsm.h"
@@ -62,7 +63,8 @@ static void iterate_bundle_links(void (*
@@ -58,7 +59,8 @@ static void iterate_bundle_links(void (*

static int get_default_epdisc(struct epdisc *);
static int parse_num(char *str, const char *key, int *valp);
Expand All @@ -26,7 +26,7 @@ Signed-off-by: George Kashperko <[email protected]>

#define set_ip_epdisc(ep, addr) do { \
ep->length = 4; \
@@ -215,35 +217,38 @@ mp_join_bundle(void)
@@ -211,35 +213,38 @@ mp_join_bundle(void)
key.dptr = bundle_id;
key.dsize = p - bundle_id;
pid = tdb_fetch(pppdb, key);
Expand Down Expand Up @@ -73,7 +73,7 @@ Signed-off-by: George Kashperko <[email protected]>
}

/* we have to make a new bundle */
@@ -423,20 +428,39 @@ parse_num(char *str, const char *key, in
@@ -419,20 +424,39 @@ parse_num(char *str, const char *key, in
return 0;
}

Expand Down Expand Up @@ -119,7 +119,7 @@ Signed-off-by: George Kashperko <[email protected]>
&& memcmp(vd.dptr, key.dptr, vd.dsize) == 0;
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -984,6 +984,16 @@ void cfg_bundle(int mrru, int mtru, int
@@ -980,6 +980,16 @@ void cfg_bundle(int mrru, int mtru, int
add_fd(ppp_dev_fd);
}

Expand All @@ -136,7 +136,7 @@ Signed-off-by: George Kashperko <[email protected]>
/*
* make_new_bundle - create a new PPP unit (i.e. a bundle)
* and connect our channel to it. This should only get called
@@ -1002,6 +1012,8 @@ void make_new_bundle(int mrru, int mtru,
@@ -998,6 +1008,8 @@ void make_new_bundle(int mrru, int mtru,

/* set the mrru and flags */
cfg_bundle(mrru, mtru, rssn, tssn);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>

--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -2251,6 +2251,9 @@ int sifdefaultroute (int unit, u_int32_t
@@ -2247,6 +2247,9 @@ int sifdefaultroute (int unit, u_int32_t
memset (&rt, 0, sizeof (rt));
SET_SA_FAMILY (rt.rt_dst, AF_INET);

Expand All @@ -23,7 +23,7 @@ Signed-off-by: Jo-Philipp Wich <[email protected]>
rt.rt_dev = ifname;
rt.rt_metric = dfl_route_metric + 1; /* +1 for binary compatibility */

@@ -2259,7 +2262,7 @@ int sifdefaultroute (int unit, u_int32_t
@@ -2255,7 +2258,7 @@ int sifdefaultroute (int unit, u_int32_t
SIN_ADDR(rt.rt_genmask) = 0L;
}

Expand Down
Loading

0 comments on commit 381f662

Please sign in to comment.