Skip to content

Commit

Permalink
package/pppd: bump version to 2.5.0
Browse files Browse the repository at this point in the history
Removed all patches, they are now included in this release.
Added other patches fixing errors.

Removed option BR2_PACKAGE_PPPD_RADIUS, upstream build system, now auto-
conf-based, does not support disabling the radius plugin.

Removed BR2_PACKAGE_PPPD_OVERWRITE_RESOLV_CONF, upstream now defaults to
/etc, quoting README:
"Note that if you have built and installed previous versions of this
package and you want to continue having configuration and TDB files in
/etc/ppp, you will need to use the --sysconfdir option to ./configure."

Switched build system to autoconf, added optional systemd support.

Added configure option to enable multilink support which now defaults to
false but was enabled before:
https://github.com/ppp-project/ppp/blob/2.4.9/pppd/Makefile.linux#L57

Signed-off-by: Bernd Kuhls <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
  • Loading branch information
bkuhls authored and jacmet committed Sep 29, 2023
1 parent 60e899b commit 0c15169
Show file tree
Hide file tree
Showing 9 changed files with 225 additions and 219 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 9d6d326b2530cffb1414e4c401675117c42d43ce Mon Sep 17 00:00:00 2001
From: Eivind Naess <[email protected]>
Date: Sun, 23 Apr 2023 11:30:43 -0700
Subject: [PATCH] Add configure check to see if we have struct sockaddr_ll

Fixes issue #411.

Signed-off-by: Eivind Naess <[email protected]>

Upstream: https://github.com/ppp-project/ppp/commit/9d6d326b2530cffb1414e4c401675117c42d43ce

Signed-off-by: Bernd Kuhls <[email protected]>
---
configure.ac | 3 ++-
pppd/plugins/pppoe/config.h.in | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 1180f64..38b24af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,8 @@ AM_COND_IF([LINUX], [
linux/if_ether.h \
linux/if_packet.h \
netinet/if_ether.h \
- netpacket/packet.h])])
+ netpacket/packet.h])
+ AC_CHECK_TYPES([struct sockaddr_ll], [], [], [#include <linux/if_packet.h>])])

AC_CHECK_SIZEOF(unsigned int)
AC_CHECK_SIZEOF(unsigned long)
diff --git a/pppd/plugins/pppoe/config.h.in b/pppd/plugins/pppoe/config.h.in
index d447f5e..d7d61c0 100644
--- a/pppd/plugins/pppoe/config.h.in
+++ b/pppd/plugins/pppoe/config.h.in
@@ -69,3 +69,5 @@
/* The size of `unsigned short', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_SHORT

+/* Define to 1 if the system has the type `struct sockaddr_ll'. */
+#undef HAVE_STRUCT_SOCKADDR_LL
--
2.39.2

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
From 7f89208b860ea0c41636410bfdb6a609b2772f47 Mon Sep 17 00:00:00 2001
From: Eivind Naess <[email protected]>
Date: Sun, 23 Apr 2023 11:37:01 -0700
Subject: [PATCH] Closes #411, Fixing up parsing in radiusclient.conf

Adding curly braces to fix the code.

Signed-off-by: Eivind Naess <[email protected]>

Upstream: https://github.com/ppp-project/ppp/commit/7f89208b860ea0c41636410bfdb6a609b2772f47

Signed-off-by: Bernd Kuhls <[email protected]>
---
pppd/plugins/radius/config.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/pppd/plugins/radius/config.c b/pppd/plugins/radius/config.c
index 39744fc..e1a4814 100644
--- a/pppd/plugins/radius/config.c
+++ b/pppd/plugins/radius/config.c
@@ -235,24 +235,28 @@ int rc_read_config(char *filename)

switch (option->type) {
case OT_STR:
- if (set_option_str(filename, line, option, p) < 0)
+ if (set_option_str(filename, line, option, p) < 0) {
fclose(configfd);
return (-1);
+ }
break;
case OT_INT:
- if (set_option_int(filename, line, option, p) < 0)
+ if (set_option_int(filename, line, option, p) < 0) {
fclose(configfd);
return (-1);
+ }
break;
case OT_SRV:
- if (set_option_srv(filename, line, option, p) < 0)
+ if (set_option_srv(filename, line, option, p) < 0) {
fclose(configfd);
return (-1);
+ }
break;
case OT_AUO:
- if (set_option_auo(filename, line, option, p) < 0)
+ if (set_option_auo(filename, line, option, p) < 0) {
fclose(configfd);
return (-1);
+ }
break;
default:
fatal("rc_read_config: impossible case branch!");
--
2.39.2

36 changes: 0 additions & 36 deletions package/pppd/0002-pppd-eap-tls.c-fix-build-with-libressl.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From cf7ac82a610bbfee57512cba345f7d49c02563a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <[email protected]>
Date: Wed, 14 Jun 2023 23:19:46 +0000
Subject: [PATCH] Fixes issue #429, stray include of an openssl header was
removed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Eivind Næss <[email protected]>

Upstream: https://github.com/ppp-project/ppp/pull/431

Signed-off-by: Bernd Kuhls <[email protected]>
---
pppd/crypto_ms.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/pppd/crypto_ms.c b/pppd/crypto_ms.c
index a9ddd5fda..ccf8129d4 100644
--- a/pppd/crypto_ms.c
+++ b/pppd/crypto_ms.c
@@ -122,8 +122,6 @@ MakeKey(const unsigned char *key, unsigned char *des_key)
DES_set_odd_parity((DES_cblock *)des_key);
}

-#include <openssl/evp.h>
-
int
DesEncrypt(const unsigned char *clear, const unsigned char *key, unsigned char *cipher)
{
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
From 7eb0cc63e38a1fcaff24bc3ca146c13414a1420e Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <[email protected]>
Date: Sun, 18 Jun 2023 15:53:43 +0200
Subject: [PATCH] pppd/ppp-sha1.c: use uint32_t instead of u_int32_t

Fixes build with musl-libc toolchains.

Upstream: https://github.com/ppp-project/ppp/pull/432

Signed-off-by: Bernd Kuhls <[email protected]>
---
pppd/ppp-sha1.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/pppd/ppp-sha1.c b/pppd/ppp-sha1.c
index ab4dcd5..9ff3a24 100644
--- a/pppd/ppp-sha1.c
+++ b/pppd/ppp-sha1.c
@@ -110,14 +110,14 @@ static void sha1_clean(PPP_MD_CTX *ctx)
#include <netinet/in.h> /* htonl() */

typedef struct {
- u_int32_t state[5];
- u_int32_t count[2];
+ uint32_t state[5];
+ uint32_t count[2];
unsigned char buffer[64];
} SHA1_CTX;


static void
-SHA1_Transform(u_int32_t[5], const unsigned char[64]);
+SHA1_Transform(uint32_t[5], const unsigned char[64]);

#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))

@@ -138,12 +138,12 @@ SHA1_Transform(u_int32_t[5], const unsigned char[64]);
/* Hash a single 512-bit block. This is the core of the algorithm. */

static void
-SHA1_Transform(u_int32_t state[5], const unsigned char buffer[64])
+SHA1_Transform(uint32_t state[5], const unsigned char buffer[64])
{
- u_int32_t a, b, c, d, e;
+ uint32_t a, b, c, d, e;
typedef union {
unsigned char c[64];
- u_int32_t l[16];
+ uint32_t l[16];
} CHAR64LONG16;
CHAR64LONG16 *block;

@@ -236,7 +236,7 @@ SHA1_Update(SHA1_CTX *context, const unsigned char *data, unsigned int len)
static void
SHA1_Final(unsigned char digest[20], SHA1_CTX *context)
{
- u_int32_t i, j;
+ uint32_t i, j;
unsigned char finalcount[8];

for (i = 0; i < 8; i++) {
--
2.39.2

17 changes: 0 additions & 17 deletions package/pppd/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,6 @@ config BR2_PACKAGE_PPPD_FILTER
the pppd active-filter and pass-filter options
are available.

config BR2_PACKAGE_PPPD_RADIUS
bool "radius"
help
Install RADIUS support for pppd

config BR2_PACKAGE_PPPD_OVERWRITE_RESOLV_CONF
bool "overwrite /etc/resolv.conf"
default y
help
Overwrite /etc/resolv.conf instead of maintaining the
separate list of nameservers in /etc/ppp/resolv.conf

Note that the pppd default of writing to /etc/ppp/resolv.conf
does not work on a read-only rootfs unless you make it
writable in your rootfs customizations (e.g. by linking it to
a file in tmpfs or by mounting a writable filesystem on it).

endif

comment "pppd needs a toolchain w/ dynamic library"
Expand Down
9 changes: 3 additions & 6 deletions package/pppd/pppd.hash
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Locally calculated
sha256 675bff4f366174649f4a3c92fd32ac476e694164ff2b0b7710019b6ead9c561e pppd-2.4.9.tar.gz
sha256 3990c65c506885f7bb75455d1d6188743a14ad46f5b62e136ef3739aed52c532 pppd/tdb.c
sha256 1822ead9d2854adfbd282322b29730a3fec4cc67f6f6a2e487aad3476e3afd59 pppd/plugins/pppoatm/COPYING
sha256 d759ec16875a69c2d5529f8cb3c040fef8fe38d26f70457aadb73c91b72746c8 pppdump/bsd-comp.c
sha256 c0d0f14b6ec9948332f10ded741293ed1f3b96e0d266e4903b605a6e1f8af7cd pppd/ccp.c
sha256 367f334c509db2b293aea5ce9f54284d9a9f6e0a9e0c6e305d544079baf8ab63 pppd/plugins/passprompt.c
sha256 425a5b2df592f4b79e251e5b0d3af48265904162cb0906691a5d35ec355b426d pppd-2.5.0.tar.gz
sha256 5d588eb3b157d52112afea935c88a7ff9efddc1e2d95a42c25d3b96ad9055008 LICENSE.BSD
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE.GPL-2
Loading

0 comments on commit 0c15169

Please sign in to comment.