fix sign problem with reporting of unknown RADIUS VSAs
[l2tpns.git] / radius.c
index 60b97a4..6cd6a93 100644 (file)
--- a/radius.c
+++ b/radius.c
@@ -1,6 +1,6 @@
 // L2TPNS Radius Stuff
 
-char const *cvs_id_radius = "$Id: radius.c,v 1.52 2006/07/01 12:40:17 bodea Exp $";
+char const *cvs_id_radius = "$Id: radius.c,v 1.53 2006/08/02 12:54:45 bodea Exp $";
 
 #include <time.h>
 #include <stdio.h>
@@ -786,11 +786,11 @@ void processrad(uint8_t *buf, int len, char socket_index)
                                        else if (*p == 26 && p[1] >= 7)
                                        {
                                                // Vendor-Specific Attribute
-                                               int vendor = ntohl(*(int *)(p + 2));
-                                               char attrib = *(p + 6);
+                                               uint32_t vendor = ntohl(*(int *)(p + 2));
+                                               uint8_t attrib = *(p + 6);
                                                int attrib_length = *(p + 7) - 2;
 
-                                               LOG(3, s, session[s].tunnel, "   Radius reply contains Vendor-Specific.  Vendor=%d Attrib=%d Length=%d\n", vendor, attrib, attrib_length);
+                                               LOG(3, s, session[s].tunnel, "   Radius reply contains Vendor-Specific.  Vendor=%u Attrib=%u Length=%d\n", vendor, attrib, attrib_length);
                                                if (vendor != 9 || attrib != 1)
                                                {
                                                        LOG(3, s, session[s].tunnel, "      Unknown vendor-specific\n");