summaryrefslogtreecommitdiff
path: root/accel-pptpd
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pptpd')
-rw-r--r--accel-pptpd/radius/dict.c2
-rw-r--r--accel-pptpd/radius/dict/dictionary.rfc286610
-rw-r--r--accel-pptpd/radius/dict/dictionary.rfc28694
-rw-r--r--accel-pptpd/radius/packet.c7
-rw-r--r--accel-pptpd/radius/radius.h10
5 files changed, 12 insertions, 21 deletions
diff --git a/accel-pptpd/radius/dict.c b/accel-pptpd/radius/dict.c
index 785e960a..9704569e 100644
--- a/accel-pptpd/radius/dict.c
+++ b/accel-pptpd/radius/dict.c
@@ -147,8 +147,6 @@ static int dict_load(const char *fname)
goto out_err_syntax;
if (!strcmp(ptr[2], "integer"))
attr->type = ATTR_TYPE_INTEGER;
- else if (!strcmp(ptr[2], "uinteger"))
- attr->type = ATTR_TYPE_UINTEGER;
else if (!strcmp(ptr[2], "string"))
attr->type = ATTR_TYPE_STRING;
else if (!strcmp(ptr[2], "date"))
diff --git a/accel-pptpd/radius/dict/dictionary.rfc2866 b/accel-pptpd/radius/dict/dictionary.rfc2866
index cd958716..15472bd5 100644
--- a/accel-pptpd/radius/dict/dictionary.rfc2866
+++ b/accel-pptpd/radius/dict/dictionary.rfc2866
@@ -6,14 +6,14 @@
# $Id: dictionary.rfc2866,v 1.2 2005/08/08 22:23:38 aland Exp $
#
ATTRIBUTE Acct-Status-Type 40 integer
-ATTRIBUTE Acct-Delay-Time 41 uinteger
-ATTRIBUTE Acct-Input-Octets 42 uinteger
-ATTRIBUTE Acct-Output-Octets 43 uinteger
+ATTRIBUTE Acct-Delay-Time 41 integer
+ATTRIBUTE Acct-Input-Octets 42 integer
+ATTRIBUTE Acct-Output-Octets 43 integer
ATTRIBUTE Acct-Session-Id 44 string
ATTRIBUTE Acct-Authentic 45 integer
ATTRIBUTE Acct-Session-Time 46 integer
-ATTRIBUTE Acct-Input-Packets 47 uinteger
-ATTRIBUTE Acct-Output-Packets 48 uinteger
+ATTRIBUTE Acct-Input-Packets 47 integer
+ATTRIBUTE Acct-Output-Packets 48 integer
ATTRIBUTE Acct-Terminate-Cause 49 integer
ATTRIBUTE Acct-Multi-Session-Id 50 string
ATTRIBUTE Acct-Link-Count 51 integer
diff --git a/accel-pptpd/radius/dict/dictionary.rfc2869 b/accel-pptpd/radius/dict/dictionary.rfc2869
index 9ece7fe6..1a2631ec 100644
--- a/accel-pptpd/radius/dict/dictionary.rfc2869
+++ b/accel-pptpd/radius/dict/dictionary.rfc2869
@@ -5,8 +5,8 @@
#
# $Id: dictionary.rfc2869,v 1.2 2005/08/08 22:23:39 aland Exp $
#
-ATTRIBUTE Acct-Input-Gigawords 52 uinteger
-ATTRIBUTE Acct-Output-Gigawords 53 uinteger
+ATTRIBUTE Acct-Input-Gigawords 52 integer
+ATTRIBUTE Acct-Output-Gigawords 53 integer
ATTRIBUTE Event-Timestamp 55 date
diff --git a/accel-pptpd/radius/packet.c b/accel-pptpd/radius/packet.c
index d4d8a9ed..21ea8efa 100644
--- a/accel-pptpd/radius/packet.c
+++ b/accel-pptpd/radius/packet.c
@@ -74,7 +74,6 @@ int rad_packet_build(struct rad_packet_t *pack, uint8_t *RA)
*ptr = attr->len + 2; ptr++;
switch(attr->attr->type) {
case ATTR_TYPE_INTEGER:
- case ATTR_TYPE_UINTEGER:
*(uint32_t*)ptr = htonl(attr->val.integer);
break;
case ATTR_TYPE_OCTETS:
@@ -212,7 +211,6 @@ int rad_packet_recv(int fd, struct rad_packet_t **p, struct sockaddr_in *addr)
break;
case ATTR_TYPE_DATE:
case ATTR_TYPE_INTEGER:
- case ATTR_TYPE_UINTEGER:
attr->val.integer = ntohl(*(uint32_t*)ptr);
break;
case ATTR_TYPE_IPADDR:
@@ -308,14 +306,11 @@ void rad_packet_print(struct rad_packet_t *pack, void (*print)(const char *fmt,
print(" <%s ", attr->attr->name);
switch (attr->attr->type) {
case ATTR_TYPE_INTEGER:
- case ATTR_TYPE_UINTEGER:
val = rad_dict_find_val(attr->attr, attr->val);
if (val)
print("%s", val->name);
- else if (attr->attr->type == ATTR_TYPE_INTEGER)
- print("%i", attr->val.integer);
else
- print("%u", attr->val.uinteger);
+ print("%i", attr->val.integer);
break;
case ATTR_TYPE_STRING:
print("\"%s\"", attr->val.string);
diff --git a/accel-pptpd/radius/radius.h b/accel-pptpd/radius/radius.h
index eadf9e31..c42989e4 100644
--- a/accel-pptpd/radius/radius.h
+++ b/accel-pptpd/radius/radius.h
@@ -6,11 +6,10 @@
#define REQ_LENGTH_MAX 4096
#define ATTR_TYPE_INTEGER 0
-#define ATTR_TYPE_UINTEGER 1
-#define ATTR_TYPE_STRING 2
-#define ATTR_TYPE_OCTETS 3
-#define ATTR_TYPE_DATE 4
-#define ATTR_TYPE_IPADDR 5
+#define ATTR_TYPE_STRING 1
+#define ATTR_TYPE_OCTETS 2
+#define ATTR_TYPE_DATE 3
+#define ATTR_TYPE_IPADDR 4
#define CODE_ACCESS_REQUEST 1
#define CODE_ACCESS_ACCEPT 2
@@ -30,7 +29,6 @@
typedef union
{
int integer;
- unsigned int uinteger;
char *string;
uint8_t *octets;
time_t date;