]> The Tcpdump Group git mirrors - tcpdump/commitdiff
MSDP: Print ": " before the protocol name
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 1 Feb 2021 09:31:34 +0000 (10:31 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 1 Feb 2021 09:49:35 +0000 (10:49 +0100)
Like with most TCP encapsulated protocols.
Use nd_print_protocol().
No more ":" after protocol name.
This change will print the protocol name even in truncation cases.

print-msdp.c

index 545f452a6671238a1f34d147d6ec2bac5ed6bab9..7845116bdc7e03001d64b4e07a1ba2ece4441c60 100644 (file)
@@ -36,12 +36,13 @@ msdp_print(netdissect_options *ndo, const u_char *sp, u_int length)
        unsigned int type, len;
 
        ndo->ndo_protocol = "msdp";
+       ND_PRINT(": ");
+       nd_print_protocol(ndo);
        /* See if we think we're at the beginning of a compound packet */
        type = GET_U_1(sp);
        len = GET_BE_U_2(sp + 1);
        if (len > 1500 || len < 3 || type == 0 || type > MSDP_TYPE_MAX)
                goto trunc;     /* not really truncated, but still not decodable */
-       ND_PRINT(" msdp:");
        while (length != 0) {
                type = GET_U_1(sp);
                len = GET_BE_U_2(sp + 1);