X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7df3ddfdcd28191ce412613fecf2a41284476654..0f24a43a7e9fbdcff2baae3990939b2bc25d9fd1:/print-radius.c diff --git a/print-radius.c b/print-radius.c index 2df9a87d..c723fd5a 100644 --- a/print-radius.c +++ b/print-radius.c @@ -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)) {