]> The Tcpdump Group git mirrors - tcpdump/commitdiff
VQP: Do not print unknown error codes twice. [skip ci]
authorDenis Ovsienko <[email protected]>
Fri, 29 Jan 2021 16:23:05 +0000 (16:23 +0000)
committerGuy Harris <[email protected]>
Sun, 20 Mar 2022 19:12:53 +0000 (12:12 -0700)
(cherry picked from commit 28e725ef4104f23db2cb806ca95ad2399b0b500b)

CHANGES
print-vqp.c
tests/vqp-oobr.out

diff --git a/CHANGES b/CHANGES
index 4bc3efa816dbda3539974b6c137908aa87b1eb2e..f7c5b2cb9f98797557f0ce5029ef25d59ce9aeef 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -11,6 +11,7 @@ TBD
       RRCP: support more Realtek protocols than just RRCP.
       MPLS: show the EXP field as TC, as per RFC 5462.
       ICMP: redo MPLS Extension code as general ICMP Extension code.
+      VQP: Do not print unknown error codes twice.
     Building and testing:
       Update config.guess and config.sub.
       Handle some Autoconf/make errors better.
index f87898e0d3e2aabd456614f106d426113620bd66..a26cd0e3274561042bbd51bd0b0e5a5569d47225 100644 (file)
@@ -132,7 +132,7 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
         ND_PRINT("VQPv%u %s Message, error-code %s (%u), length %u",
                version,
                tok2str(vqp_msg_type_values, "unknown (%u)",GET_U_1(vqp_common_header->msg_type)),
-               tok2str(vqp_error_code_values, "unknown (%u)",GET_U_1(vqp_common_header->error_code)),
+               tok2str(vqp_error_code_values, "unknown", GET_U_1(vqp_common_header->error_code)),
                GET_U_1(vqp_common_header->error_code),
                len);
         return;
@@ -143,7 +143,7 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
     ND_PRINT("\n\tVQPv%u, %s Message, error-code %s (%u), seq 0x%08x, items %u, length %u",
            version,
           tok2str(vqp_msg_type_values, "unknown (%u)",GET_U_1(vqp_common_header->msg_type)),
-          tok2str(vqp_error_code_values, "unknown (%u)",GET_U_1(vqp_common_header->error_code)),
+          tok2str(vqp_error_code_values, "unknown", GET_U_1(vqp_common_header->error_code)),
           GET_U_1(vqp_common_header->error_code),
           GET_BE_U_4(vqp_common_header->sequence),
           nitems,
index 01825153bf4352e7d0ee53e563a388b3ff2f4674..358599e159f40d2cbaa5f0d3038dc4a5513123ea 100644 (file)
@@ -1,3 +1,3 @@
     1  [Error converting time] IP (tos 0x0, ttl 17, id 40207, offset 0, flags [+, DF, rsvd], proto UDP (17), length 46, bad cksum 8f04 (->f897)!)
     0.0.128.20.1589 > 12.251.167.8.62720: 
-       VQPv1, unknown (127) Message, error-code unknown (31) (31), seq 0x80f90000, items 27, length 18 [|vqp]
+       VQPv1, unknown (127) Message, error-code unknown (31), seq 0x80f90000, items 27, length 18 [|vqp]