]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-radius.c
Handle rpcaps:// URLs as well, for rpcap-over-TLS.
[tcpdump] / print-radius.c
index 2df9a87d411b8730e89387ab77ecd556f6c3d8a7..c723fd5a2d64550e095e0c9973dbfd3fde6eeb20 100644 (file)
@@ -458,7 +458,7 @@ static const struct tok errorcausetype[] = {
 #define IP4_TRANSPORT_SUPPORTED 0x0000800000000000
 #define IP4_HOA_ONLY_SUPPORTED 0x0001000000000000
 #define INTER_MAG_ROUTING_SUPPORTED 0x0002000000000000
-static struct mip6_feature_vector {
+static const struct mip6_feature_vector {
                   uint64_t v;
                   const char *s;
                 } mip6_feature_vector[] = {
@@ -477,7 +477,7 @@ static struct mip6_feature_vector {
                                };
 
 
-static struct attrtype {
+static const struct attrtype {
                   const char *name;      /* Attribute name                 */
                   const char **subtypes; /* Standard Values (if any)       */
                   u_char siz_subtypes;   /* Size of total standard values  */
@@ -1174,26 +1174,22 @@ radius_attrs_print(netdissect_options *ndo,
        attr_string = attr_type[type].name;
      else
        attr_string = "Unknown";
-     if (len < 2)
-     {
-       ND_PRINT("\n\t  %s Attribute (%u), length: %u (bogus, must be >= 2)",
+
+     ND_PRINT("\n\t  %s Attribute (%u), length: %u",
                attr_string,
                type,
                len);
-       return;
+     if (len < 2)
+     {
+       ND_PRINT(" (bogus, must be >= 2)");
+       return;
      }
      if (len > length)
      {
-       ND_PRINT("\n\t  %s Attribute (%u), length: %u (bogus, goes past end of packet)",
-               attr_string,
-               type,
-               len);
+        ND_PRINT(" (bogus, goes past end of packet)");
         return;
      }
-     ND_PRINT("\n\t  %s Attribute (%u), length: %u, Value: ",
-            attr_string,
-            type,
-            len);
+     ND_PRINT(", Value: ");
 
      if (type < TAM_SIZE(attr_type))
      {