summaryrefslogtreecommitdiff
path: root/src/libradius/radius_message.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2017-05-30 20:59:31 +0200
committerYves-Alexis Perez <corsac@corsac.net>2017-05-30 21:03:44 +0200
commit335b7e322c795d86705aab67d2ecf72f1c9c5614 (patch)
treec3a2256cd4d3c9242c47da2a47077b12b3b7a1a6 /src/libradius/radius_message.c
parent7f6fc258427831ed2e80f7540c4368cf6ceba385 (diff)
downloadvyos-strongswan-335b7e322c795d86705aab67d2ecf72f1c9c5614.tar.gz
vyos-strongswan-335b7e322c795d86705aab67d2ecf72f1c9c5614.zip
New upstream version 5.5.3
Diffstat (limited to 'src/libradius/radius_message.c')
-rw-r--r--src/libradius/radius_message.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/libradius/radius_message.c b/src/libradius/radius_message.c
index 9705d3b53..51135fbea 100644
--- a/src/libradius/radius_message.c
+++ b/src/libradius/radius_message.c
@@ -244,8 +244,12 @@ typedef struct {
} attribute_enumerator_t;
METHOD(enumerator_t, attribute_enumerate, bool,
- attribute_enumerator_t *this, int *type, chunk_t *data)
+ attribute_enumerator_t *this, va_list args)
{
+ chunk_t *data;
+ int *type;
+
+ VA_ARGS_VGET(args, type, data);
if (this->left == 0)
{
return FALSE;
@@ -275,7 +279,8 @@ METHOD(radius_message_t, create_enumerator, enumerator_t*,
}
INIT(e,
.public = {
- .enumerate = (void*)_attribute_enumerate,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _attribute_enumerate,
.destroy = (void*)free,
},
.next = (rattr_t*)this->msg->attributes,
@@ -299,12 +304,14 @@ typedef struct {
} vendor_enumerator_t;
METHOD(enumerator_t, vendor_enumerate, bool,
- vendor_enumerator_t *this, int *vendor, int *type, chunk_t *data)
+ vendor_enumerator_t *this, va_list args)
{
- chunk_t inner_data;
- int inner_type;
+ chunk_t inner_data, *data;
+ int inner_type, *vendor, *type;
uint8_t type8, len;
+ VA_ARGS_VGET(args, vendor, type, data);
+
while (TRUE)
{
if (this->reader)
@@ -354,7 +361,8 @@ METHOD(radius_message_t, create_vendor_enumerator, enumerator_t*,
INIT(e,
.public = {
- .enumerate = (void*)_vendor_enumerate,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _vendor_enumerate,
.destroy = _vendor_destroy,
},
.inner = create_enumerator(this),