]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-radius.c
More nd_ification of structures.
[tcpdump] / print-radius.c
index 5ce68d163cd8bff63cb80dd3c14e6754f73de602..fda7710ca191119c7cd9b8effac35af9c536b8d9 100644 (file)
@@ -593,7 +593,7 @@ print_attr_string(netdissect_options *ndo,
       case TUNNEL_PASS:
            if (length < 3)
               goto trunc;
-           if (*data && (*data <=0x1F) )
+           if (EXTRACT_U_1(data) && (EXTRACT_U_1(data) <= 0x1F))
               ND_PRINT((ndo, "Tag[%u] ", EXTRACT_U_1(data)));
            else
               ND_PRINT((ndo, "Tag[Unused] "));
@@ -609,11 +609,11 @@ print_attr_string(netdissect_options *ndo,
       case TUNNEL_ASSIGN_ID:
       case TUNNEL_CLIENT_AUTH:
       case TUNNEL_SERVER_AUTH:
-           if (*data <= 0x1F)
+           if (EXTRACT_U_1(data) <= 0x1F)
            {
               if (length < 1)
                  goto trunc;
-              if (*data)
+              if (EXTRACT_U_1(data))
                 ND_PRINT((ndo, "Tag[%u] ", EXTRACT_U_1(data)));
               else
                 ND_PRINT((ndo, "Tag[Unused] "));
@@ -667,7 +667,7 @@ print_vendor_attr(netdissect_options *ndo,
     while (length >= 2) {
        ND_TCHECK_2(data);
 
-        vendor_type = *(data);
+        vendor_type = EXTRACT_U_1(data);
         vendor_length = EXTRACT_U_1(data + 1);
 
         if (vendor_length < 2)
@@ -731,7 +731,7 @@ print_attr_num(netdissect_options *ndo,
 
       if ( (attr_code == TUNNEL_TYPE) || (attr_code == TUNNEL_MEDIUM) )
       {
-         if (!*data)
+         if (!EXTRACT_U_1(data))
             ND_PRINT((ndo, "Tag[Unused] "));
          else
             ND_PRINT((ndo, "Tag[%d] ", EXTRACT_U_1(data)));
@@ -795,7 +795,7 @@ print_attr_num(netdissect_options *ndo,
           break;
 
         case TUNNEL_PREFERENCE:
-            if (*data)
+            if (EXTRACT_U_1(data))
                ND_PRINT((ndo, "Tag[%d] ", EXTRACT_U_1(data)));
             else
                ND_PRINT((ndo, "Tag[Unused] "));
@@ -1002,7 +1002,7 @@ print_attr_strange(netdissect_options *ndo,
                return;
            }
            ND_TCHECK_1(data);
-           if (*data)
+           if (EXTRACT_U_1(data))
               ND_PRINT((ndo, "User can change password"));
            else
               ND_PRINT((ndo, "User cannot change password"));