]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add a nd_print_trunc() call
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 18 May 2018 12:55:12 +0000 (14:55 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 18 May 2018 12:58:38 +0000 (14:58 +0200)
Replace a ND_TTEST_*() with ND_TCHECK_*().
Update the output of some tests accordingly.

print-isoclns.c
tests/isoclns-heapoverflow.out
tests/isoclns-oobr.out

index 38f40d19311bed056ba92add63824b5809e0dd3c..246b681b0ea3b3d375d2837ac154adf06bba27a1 100644 (file)
@@ -679,10 +679,7 @@ void
 isoclns_print(netdissect_options *ndo, const u_char *p, u_int length)
 {
        ndo->ndo_protocol = "isoclns";
-       if (!ND_TTEST_1(p)) { /* enough bytes on the wire ? */
-               ND_PRINT("|OSI");
-               return;
-       }
+       ND_TCHECK_1(p); /* enough bytes on the wire ? */
 
        if (ndo->ndo_eflag)
                ND_PRINT("OSI NLPID %s (0x%02x): ", tok2str(nlpid_values, "Unknown", EXTRACT_U_1(p)), EXTRACT_U_1(p));
@@ -731,6 +728,9 @@ isoclns_print(netdissect_options *ndo, const u_char *p, u_int length)
                        print_unknown_data(ndo, p, "\n\t", length);
                break;
        }
+       return;
+trunc:
+       nd_print_trunc(ndo);
 }
 
 #define        CLNP_PDU_ER      1
index c2cfdfb231e2b1fd73368846d1dd74670afdae37..d73b4152870951eea6222deb05e762f338613418 100644 (file)
@@ -1 +1 @@
-|OSI
+ [|isoclns]
index c2cfdfb231e2b1fd73368846d1dd74670afdae37..d73b4152870951eea6222deb05e762f338613418 100644 (file)
@@ -1 +1 @@
-|OSI
+ [|isoclns]