From b8c35a7307d8a23b6089a73225bb164c9c328725 Mon Sep 17 00:00:00 2001 From: eaglegai Date: Fri, 14 Feb 2025 07:15:38 +0000 Subject: [PATCH] fix up parsing in radiusclient.conf and add check for struct sockaddr_ll (cherry picked from commit 5275f2591d5a0e4046df923e9001bb78ccb34fa2) --- ...to-see-if-we-have-struct-sockaddr_ll.patch | 37 ++++++++++++++ ...xing-up-parsing-in-radiusclient.conf.patch | 49 +++++++++++++++++++ ppp.spec | 13 ++++- 3 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 backport-Add-configure-check-to-see-if-we-have-struct-sockaddr_ll.patch create mode 100644 backport-Fixing-up-parsing-in-radiusclient.conf.patch diff --git a/backport-Add-configure-check-to-see-if-we-have-struct-sockaddr_ll.patch b/backport-Add-configure-check-to-see-if-we-have-struct-sockaddr_ll.patch new file mode 100644 index 0000000..a7823d4 --- /dev/null +++ b/backport-Add-configure-check-to-see-if-we-have-struct-sockaddr_ll.patch @@ -0,0 +1,37 @@ +From 9d6d326b2530cffb1414e4c401675117c42d43ce Mon Sep 17 00:00:00 2001 +From: Eivind Naess +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 +--- + 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 1180f64ec..38b24af92 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 ])]) + + 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 d447f5e89..d7d61c01c 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 diff --git a/backport-Fixing-up-parsing-in-radiusclient.conf.patch b/backport-Fixing-up-parsing-in-radiusclient.conf.patch new file mode 100644 index 0000000..a898e25 --- /dev/null +++ b/backport-Fixing-up-parsing-in-radiusclient.conf.patch @@ -0,0 +1,49 @@ +From 7f89208b860ea0c41636410bfdb6a609b2772f47 Mon Sep 17 00:00:00 2001 +From: Eivind Naess +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 +--- + 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 39744fca1..e1a481487 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!"); diff --git a/ppp.spec b/ppp.spec index 0650189..f62281f 100644 --- a/ppp.spec +++ b/ppp.spec @@ -1,6 +1,6 @@ Name: ppp Version: 2.5.0 -Release: 3 +Release: 4 Summary: The Point-to-Point Protocol License: BSD and LGPLv2+ and GPLv2+ and Public Domain @@ -36,6 +36,9 @@ Patch0008: backport-0014-everywhere-use-SOCK_CLOEXEC-when-creating-socket.p Patch0009: refuse-pap-by-default-for-security.patch +Patch0010: backport-Fixing-up-parsing-in-radiusclient.conf.patch +Patch0011: backport-Add-configure-check-to-see-if-we-have-struct-sockaddr_ll.patch + %description The Point-to-Point Protocol (PPP) provides a standard way to establish a network connection over a serial link. At present, this package @@ -138,6 +141,14 @@ mkdir -p %{buildroot}%{_rundir}/pppd/lock %{_mandir}/man8/*.8.gz %changelog +* Fri Feb 14 2025 gaihuiying - 2.5.0-4 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:backport upstream + Fixing up parsing in radiusclient.conf + Add configure check to see if we have struct sockaddr_ll + * Mon Aug 05 2024 gaihuiying - 2.5.0-3 - Type:bugfix - CVE:NA -- Gitee