]> The Tcpdump Group git mirrors - tcpdump/commitdiff
GRE, VXLAN: Fix output printing with s/printf/ND_PRINT/
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 17 Oct 2023 12:59:48 +0000 (14:59 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 17 Oct 2023 13:14:18 +0000 (15:14 +0200)
This is a follow-up to a3274b6d27025734d3 and 96026bdec.

print-gre.c
print-vxlan-gpe.c

index 30bb6c212a54d8c425463da3d72c0b30312cf8fa..732903f84fbeebc79ae21cdac3fd276936f10336 100644 (file)
@@ -239,7 +239,7 @@ gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length)
                 * use it for keep-alives; see, for example,
                 * https://www.cisco.com/c/en/us/support/docs/ip/generic-routing-encapsulation-gre/118370-technote-gre-00.html#anc1
                 */
-               printf("keep-alive");
+               ND_PRINT("keep-alive");
                break;
        case GRE_WCCP:
                /*
@@ -283,7 +283,7 @@ gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length)
                        bp += sizeof(*wccp);
                        len -= sizeof(*wccp);
 
-                       printf(": ");
+                       ND_PRINT(": ");
                }
                /* FALLTHROUGH */
        case ETHERTYPE_IP:
index 6e6c4c077e302af6646fc396af525e38bbe0685b..b7676327635f11eba51a860d65dd0742bbfd508e 100644 (file)
@@ -136,10 +136,10 @@ vxlan_gpe_print(netdissect_options *ndo, const u_char *bp, u_int len)
     len -= 3;
 
     if (flags & VXLAN_GPE_B)
-        printf(", BUM");
+        ND_PRINT(", BUM");
 
     if (flags & VXLAN_GPE_O) {
-        printf(", OAM (proto 0x%x, len %u)", next_protocol, len);
+        ND_PRINT(", OAM (proto 0x%x, len %u)", next_protocol, len);
         return;
     }