[freeradius-client] encode the IPv6 address attributes correctly

Nikos Mavrogiannopoulos nmav at fedoraproject.org
Tue Mar 24 10:47:11 UTC 2015


commit b640de4fef99ea576d4c222f2a6ac7465c4e14e3
Author: Nikos Mavrogiannopoulos <nmav at redhat.com>
Date:   Tue Mar 24 11:44:13 2015 +0100

    encode the IPv6 address attributes correctly
    
    Resolves: rhbz#1205156

 freeradius-client-1.1.7-ipv6-attr-fix.patch | 32 +++++++++++++++++++++++++++++
 freeradius-client.spec                      |  7 ++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)
---
diff --git a/freeradius-client-1.1.7-ipv6-attr-fix.patch b/freeradius-client-1.1.7-ipv6-attr-fix.patch
new file mode 100644
index 0000000..1c2b636
--- /dev/null
+++ b/freeradius-client-1.1.7-ipv6-attr-fix.patch
@@ -0,0 +1,32 @@
+From 3bea3b05583fb4d14521475503c9ee2d3b632987 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav at redhat.com>
+Date: Mon, 2 Mar 2015 12:08:51 +0100
+Subject: [PATCH] when sending IPv6 attributes use the correct length
+
+---
+ lib/sendserver.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/sendserver.c b/lib/sendserver.c
+index 1fdcff2..30ce5de 100644
+--- a/lib/sendserver.c
++++ b/lib/sendserver.c
+@@ -150,6 +150,7 @@ static int rc_pack_list (VALUE_PAIR *vp, char *secret, AUTH_HDR *auth)
+ 
+ 		    case PW_TYPE_IPV6ADDR:
+ 			length = 16;
++			*buf++ = length + 2;
+ 			if (vsa_length_ptr != NULL) *vsa_length_ptr += length + 2;
+ 			memcpy (buf, vp->strvalue, (size_t) length);
+ 			buf += length;
+@@ -158,6 +159,7 @@ static int rc_pack_list (VALUE_PAIR *vp, char *secret, AUTH_HDR *auth)
+ 
+ 		    case PW_TYPE_IPV6PREFIX:
+ 			length = vp->lvalue;
++			*buf++ = length + 2;
+ 			if (vsa_length_ptr != NULL) *vsa_length_ptr += length + 2;
+ 			memcpy (buf, vp->strvalue, (size_t) length);
+ 			buf += length;
+-- 
+2.1.0
+
diff --git a/freeradius-client.spec b/freeradius-client.spec
index a7c65ac..e5d28e5 100644
--- a/freeradius-client.spec
+++ b/freeradius-client.spec
@@ -1,7 +1,7 @@
 Summary: RADIUS protocol client library
 Name: freeradius-client
 Version: 1.1.7
-Release: 5%{?dist}
+Release: 6%{?dist}
 # For a breakdown of the licensing, see PACKAGE-LICENSING 
 License: BSD and MIT
 Group: Applications/Internet
@@ -10,6 +10,7 @@ Source0: ftp://ftp.freeradius.org/pub/freeradius/%{name}-%{version}.tar.gz
 Source1: radiusclient.conf
 Source2: PACKAGE-LICENSING
 Patch1: freeradius-client-1.1.7-size_t.patch
+Patch2: freeradius-client-1.1.7-ipv6-attr-fix.patch
 
 BuildRequires: nettle-devel >= 2.7.1
 
@@ -44,6 +45,7 @@ rm -f lib/md5.c
 sed -i -e 's|sys_lib_dlsearch_path_spec="[^"]\+|& %{_libdir}|g' configure
 
 %patch1 -p1 -b .size_t
+%patch2 -p1 -b .attr
 
 %build
 
@@ -98,6 +100,9 @@ cp %{SOURCE1} %{buildroot}%{_sysconfdir}/radiusclient/
 %{_sbindir}/radembedded
 
 %changelog
+* Tue Mar 24 2015 Nikos Mavrogiannopoulos - 1.1.7-6
+- when sending IPv6 attributes use the correct length (#1205156)
+
 * Mon Feb 23 2015 Nikos Mavrogiannopoulos - 1.1.7-5
 - Corrected paths of files includes in config file
 


More information about the scm-commits mailing list