Use more the nd_print_trunc() call

Update the output of a test accordingly.
This commit is contained in:
Francois-Xavier Le Bail 2018-05-18 11:14:27 +02:00
parent 95e10b2026
commit a1042c21e5
2 changed files with 2 additions and 5 deletions

View File

@ -52,10 +52,7 @@ ah_print(netdissect_options *ndo, const u_char *bp)
ND_PRINT(",sumlen=%u", sumlen);
ND_TCHECK_4(ah + 1);
ND_PRINT(",seq=0x%x", EXTRACT_BE_U_4(ah + 1));
if (!ND_TTEST_LEN(bp, sizeof(struct ah) + sumlen)) {
ND_PRINT("[truncated]):");
return -1;
}
ND_TCHECK_LEN(bp, sizeof(struct ah) + sumlen);
ND_PRINT("): ");
return sizeof(struct ah) + sumlen;

View File

@ -3,4 +3,4 @@
0x0010: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
0x0020: 3030 00
IP (tos 0x30, ttl 48, id 12336, offset 0, flags [none], proto AH (51), length 12336, bad cksum 3030 (->697b)!)
48.48.48.48 > 48.48.48.48: AH(spi=0x30303030,sumlen=192,seq=0x30303030[truncated]):
48.48.48.48 > 48.48.48.48: AH(spi=0x30303030,sumlen=192,seq=0x30303030 [|ah]