summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-05-11 10:40:40 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-05-17 12:51:47 +0200
commitd07444a5f284ac724cdc7a120831f1585e7185b9 (patch)
tree0951a386ea3c42ef4f06e4620a76f18b30371c5a
parentdb3f9f277f4283318a760791dac2bed9507b4793 (diff)
downloadtcpdump-d07444a5f284ac724cdc7a120831f1585e7185b9.tar.gz
Add more nd_print_trunc() calls
Update the output of some tests accordingly.
-rw-r--r--print-ipx.c2
-rw-r--r--print-mpls.c6
-rw-r--r--print-msnlb.c2
-rw-r--r--print-zephyr.c2
-rw-r--r--tests/hoobr_parse_field.out2
-rw-r--r--tests/msnlb2.out4
6 files changed, 8 insertions, 10 deletions
diff --git a/print-ipx.c b/print-ipx.c
index c2c32740..674dd457 100644
--- a/print-ipx.c
+++ b/print-ipx.c
@@ -93,7 +93,7 @@ ipx_print(netdissect_options *ndo, const u_char *p, u_int length)
ipx_decode(ndo, ipx, p + ipxSize, length - ipxSize);
return;
trunc:
- ND_PRINT("[|ipx %u]", length);
+ nd_print_trunc(ndo);
}
static const char *
diff --git a/print-mpls.c b/print-mpls.c
index e45f2826..77ed2f3b 100644
--- a/print-mpls.c
+++ b/print-mpls.c
@@ -69,10 +69,8 @@ mpls_print(netdissect_options *ndo, const u_char *bp, u_int length)
ND_PRINT("MPLS");
do {
ND_TCHECK_LEN(p, sizeof(label_entry));
- if (length < sizeof(label_entry)) {
- ND_PRINT("[|MPLS], length %u", length);
- return;
- }
+ if (length < sizeof(label_entry))
+ goto trunc;
label_entry = EXTRACT_BE_U_4(p);
ND_PRINT("%s(label %u",
(label_stack_depth && ndo->ndo_vflag) ? "\n\t" : " ",
diff --git a/print-msnlb.c b/print-msnlb.c
index 5fdf5575..7a86ff06 100644
--- a/print-msnlb.c
+++ b/print-msnlb.c
@@ -62,5 +62,5 @@ msnlb_print(netdissect_options *ndo, const u_char *bp)
ND_PRINT(" host IP: %s", ipaddr_string(ndo, hb->host_ip));
return;
trunc:
- ND_PRINT("[|MS NLB]");
+ nd_print_trunc(ndo);
}
diff --git a/print-zephyr.c b/print-zephyr.c
index 3edbeea4..bce7394b 100644
--- a/print-zephyr.c
+++ b/print-zephyr.c
@@ -343,6 +343,6 @@ zephyr_print(netdissect_options *ndo, const u_char *cp, int length)
return;
trunc:
- ND_PRINT(" [|zephyr] (%d)", length);
+ nd_print_trunc(ndo);
return;
}
diff --git a/tests/hoobr_parse_field.out b/tests/hoobr_parse_field.out
index 1c0779d3..2184bc5a 100644
--- a/tests/hoobr_parse_field.out
+++ b/tests/hoobr_parse_field.out
@@ -2,4 +2,4 @@
0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
0x0010: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
0x0020: 3030 00
-IP 48.48.48.48.2104 > 48.48.48.48.12336: [|zephyr] (12308)
+IP 48.48.48.48.2104 > 48.48.48.48.12336: [|zephyr]
diff --git a/tests/msnlb2.out b/tests/msnlb2.out
index 00fc1a66..2b57b648 100644
--- a/tests/msnlb2.out
+++ b/tests/msnlb2.out
@@ -1,2 +1,2 @@
-[|MS NLB]
-[|MS NLB]
+ [|msnlb]
+ [|msnlb]