package/pppd: bump package to fix startup issue

pppd fails to start on a systems with buildroot 2024.02.x because of
missing pppd directory in /var/run. There are some logs hinting at this
issue:
Warning: couldn't open ppp database /var/run/pppd/pppd2.tdb
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory

The issue has already been detected and fixed upstream (see [1]) and is
expected to be released on a v2.5.1, but this release seems to be stalled
for now (see [2]). Bump on current master, which currently reflects what
will likely be the 2.5.1.

[1] https://github.com/ppp-project/ppp/issues/419
[2] https://github.com/ppp-project/ppp/issues/460

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Alexis Lothoré 2024-04-18 10:58:58 +02:00 committed by Thomas Petazzoni
parent 639f507479
commit c1b04a3254
7 changed files with 3 additions and 264 deletions

View File

@ -1,44 +0,0 @@
From 9d6d326b2530cffb1414e4c401675117c42d43ce Mon Sep 17 00:00:00 2001
From: Eivind Naess <eivnaes@yahoo.com>
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 <eivnaes@yahoo.com>
Upstream: https://github.com/ppp-project/ppp/commit/9d6d326b2530cffb1414e4c401675117c42d43ce
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
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

View File

@ -1,56 +0,0 @@
From 7f89208b860ea0c41636410bfdb6a609b2772f47 Mon Sep 17 00:00:00 2001
From: Eivind Naess <eivnaes@yahoo.com>
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 <eivnaes@yahoo.com>
Upstream: https://github.com/ppp-project/ppp/commit/7f89208b860ea0c41636410bfdb6a609b2772f47
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
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

View File

@ -1,31 +0,0 @@
From cf7ac82a610bbfee57512cba345f7d49c02563a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
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 <eivnaes@yahoo.com>
Upstream: https://github.com/ppp-project/ppp/pull/431
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
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)
{

View File

@ -1,64 +0,0 @@
From 7eb0cc63e38a1fcaff24bc3ca146c13414a1420e Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd@kuhls.net>
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 <bernd@kuhls.net>
---
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

View File

@ -1,66 +0,0 @@
From 7a3f478a4b7128d4f70ea64d99fedec766b1c009 Mon Sep 17 00:00:00 2001
From: Jaco Kroon <jaco@uls.co.za>
Date: Tue, 31 Oct 2023 11:47:21 +0200
Subject: [PATCH] pppd/sys-linux: Fix compile with older Linux kernel headers
(#452)
When compiling pppd against kernel headers which don't provide
the definitions for the NETLINK mechanisms, leave out the code
which uses NETLINK, so as to avoid getting compile errors.
Upstream commit in Linux refers.
commit 10c9ead9f3c6bb24bddc9a96681f7d58e6623966
Author: Roopa Prabhu <roopa@cumulusnetworks.com>
Date: Wed Apr 20 08:43:43 2016 -0700
rtnetlink: add new RTM_GETSTATS message to dump link stats
This commit adds the #defines and structs used, so simply not compiling
this code if the required #defines isn't there should solve the problem.
Closes: #450
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Upstream: https://github.com/ppp-project/ppp/commit/7a3f478a4b7128d4f70ea64d99fedec766b1c009
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
pppd/sys-linux.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
index 561b150f2..a8d6cd95b 100644
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -131,16 +131,6 @@
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/if_link.h>
-
-/* Attempt at retaining compile-support with older than 4.7 kernels, or kernels
- * where RTM_NEWSTATS isn't defined for whatever reason.
- */
-#ifndef RTM_NEWSTATS
-#define RTM_NEWSTATS 92
-#define RTM_GETSTATS 94
-#define IFLA_STATS_LINK_64 1
-#endif
-
#include <linux/if_addr.h>
/* glibc versions prior to 2.24 do not define SOL_NETLINK */
@@ -1776,6 +1766,7 @@ get_ppp_stats_ioctl(int u, struct pppd_stats *stats)
static int
get_ppp_stats_rtnetlink(int u, struct pppd_stats *stats)
{
+#ifdef RTM_NEWSTATS
static int fd = -1;
struct {
@@ -1825,6 +1816,7 @@ get_ppp_stats_rtnetlink(int u, struct pppd_stats *stats)
err:
close(fd);
fd = -1;
+#endif
return 0;
}

View File

@ -1,4 +1,4 @@
# Locally calculated
sha256 425a5b2df592f4b79e251e5b0d3af48265904162cb0906691a5d35ec355b426d pppd-2.5.0.tar.gz
sha256 535efa0e7c36e9d443b1b52c296d63ab2c1ec9458816ea0e37c701e0a921466d pppd-e1266c76d1ad39f98f11676e34f180f78c5a510c.tar.gz
sha256 5d588eb3b157d52112afea935c88a7ff9efddc1e2d95a42c25d3b96ad9055008 LICENSE.BSD
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE.GPL-2

View File

@ -6,8 +6,8 @@
# The tarball provided at https://download.samba.org/pub/ppp/ does not
# include the license files yet so we use the github tarball.
PPPD_VERSION = 2.5.0
PPPD_SITE = $(call github,ppp-project,ppp,ppp-$(PPPD_VERSION))
PPPD_VERSION = e1266c76d1ad39f98f11676e34f180f78c5a510c
PPPD_SITE = $(call github,ppp-project,ppp,$(PPPD_VERSION))
PPPD_LICENSE = LGPL-2.0+, LGPL, BSD-4-Clause, BSD-3-Clause, GPL-2.0+
PPPD_LICENSE_FILES = LICENSE.BSD LICENSE.GPL-2
PPPD_CPE_ID_VENDOR = point-to-point_protocol_project