33 lines
1.0 KiB
Diff
33 lines
1.0 KiB
Diff
From 3bea3b05583fb4d14521475503c9ee2d3b632987 Mon Sep 17 00:00:00 2001
|
|
From: Nikos Mavrogiannopoulos <nmav@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
|
|
|