]> The Tcpdump Group git mirrors - tcpdump/commitdiff
VTP: Update two error messages
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 14 May 2023 12:01:57 +0000 (14:01 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 14 May 2023 12:17:35 +0000 (14:17 +0200)
This change will avoid having the keyword "invalid" twice as:
[invalid MgmtD Len nnn] (invalid)
and
(invalid TLV length nnn != 1) (invalid)

print-vtp.c

index bcee64cfe58d215bfc2b01e667aa505fd437f228..1637db661d0f0b8a1f046797479eb6b7d086afc1 100644 (file)
@@ -148,7 +148,7 @@ vtp_print(netdissect_options *ndo,
     ND_PRINT("\n\tDomain name: ");
     mgmtd_len = GET_U_1(tptr + 3);
     if (mgmtd_len < 1 ||  mgmtd_len > VTP_DOMAIN_NAME_LEN) {
-       ND_PRINT(" [invalid MgmtD Len %u]", mgmtd_len);
+       ND_PRINT(" [MgmtD Len %u]", mgmtd_len);
        goto invalid;
     }
     nd_printjnp(ndo, tptr + 4, mgmtd_len);
@@ -300,7 +300,7 @@ vtp_print(netdissect_options *ndo,
                  * in units of 16-bit words.
                  */
                 if (tlv_len != 1) {
-                    ND_PRINT(" (invalid TLV length %u != 1)", tlv_len);
+                    ND_PRINT(" [TLV length %u != 1]", tlv_len);
                     goto invalid;
                 } else {
                     tlv_value = GET_BE_U_2(tptr + 2);