commit:     6e3381b2d8d7122bf6563988045768e9a6c7f0db
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat May 24 18:03:31 2025 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat May 24 18:04:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e3381b2

net-vpn/ocserv: fix build with freeradius-client-1.1.8

Closes: https://bugs.gentoo.org/956426
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../files/ocserv-1.3.0-freeradius-1.1.8.patch      | 44 ++++++++++++++++++++++
 net-vpn/ocserv/ocserv-1.3.0-r1.ebuild              |  3 +-
 2 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/net-vpn/ocserv/files/ocserv-1.3.0-freeradius-1.1.8.patch 
b/net-vpn/ocserv/files/ocserv-1.3.0-freeradius-1.1.8.patch
new file mode 100644
index 000000000000..7227b4b08467
--- /dev/null
+++ b/net-vpn/ocserv/files/ocserv-1.3.0-freeradius-1.1.8.patch
@@ -0,0 +1,44 @@
+https://bugs.gentoo.org/956426
+https://gitlab.com/openconnect/ocserv/-/issues/650
+https://gitlab.com/openconnect/ocserv/-/merge_requests/453
+
+From 555ea8d706a4dcde7c855fe5a8e17775a94299e0 Mon Sep 17 00:00:00 2001
+From: Dimitri Papadopoulos
+ <[email protected]>
+Date: Fri, 23 May 2025 11:18:55 +0200
+Subject: [PATCH] Work around API breakage in freeradius-client 1.1.8
+
+FreeRADIUS client 1.1.8 introduced this backwards-incompatible API change:
+https://github.com/FreeRADIUS/freeradius-client/commit/50d78bb53f4f341aa708e196b8955cacbae59669
+
+Signed-off-by: Dimitri Papadopoulos 
<[email protected]>
+---
+ src/auth/radius.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/auth/radius.c b/src/auth/radius.c
+index 4dc6e717..08231d15 100644
+--- a/src/auth/radius.c
++++ b/src/auth/radius.c
+@@ -468,7 +468,17 @@ static int radius_auth_pass(void *ctx, const char *pass, 
unsigned pass_len)
+                               pctx->tx_per_sec = vp->lvalue;
+                       } else {
+                               oc_syslog(LOG_DEBUG, "radius-auth: ignoring 
server's attribute (%u,%u) of type %u",
+-                                      (unsigned)ATTRID(vp->attribute), 
(unsigned)VENDOR(vp->attribute), (unsigned)vp->type);
++#ifndef ATTRID
++                                      (unsigned)vp->attribute,
++#else
++                                      (unsigned)ATTRID(vp->attribute),
++#endif
++#ifndef VENDOR
++                                      (unsigned)vp->vendor,
++#else
++                                      (unsigned)VENDOR(vp->attribute),
++#endif
++                                      (unsigned)vp->type);
+                       }
+                       vp = vp->next;
+               }
+-- 
+2.49.0
+

diff --git a/net-vpn/ocserv/ocserv-1.3.0-r1.ebuild 
b/net-vpn/ocserv/ocserv-1.3.0-r1.ebuild
index f00823b69613..a8a40714032a 100644
--- a/net-vpn/ocserv/ocserv-1.3.0-r1.ebuild
+++ b/net-vpn/ocserv/ocserv-1.3.0-r1.ebuild
@@ -52,7 +52,7 @@ DEPEND="
        lz4? ( app-arch/lz4:0= )
        otp? ( sys-auth/oath-toolkit:0= )
        pam? ( sys-libs/pam:0= )
-       radius? ( <net-dialup/freeradius-client-1.1.8:0= )
+       radius? ( net-dialup/freeradius-client:0= )
        seccomp? ( sys-libs/libseccomp:0= )
        systemd? ( sys-apps/systemd:0= )
        tcpd? ( sys-apps/tcp-wrappers:0= )
@@ -61,6 +61,7 @@ RDEPEND="${DEPEND}"
 
 PATCHES=(
        "${FILESDIR}"/ocserv-1.3.0-seccomp-readlinkat.patch
+       "${FILESDIR}"/ocserv-1.3.0-freeradius-1.1.8.patch
 )
 
 src_prepare() {

Reply via email to