"length" is now the *remaining* packet length.
The loop that processes MPLS labels decrements the length for each
label, so it's the remaining length; don't subtract the total length of
the MPLS labels from it before handing it to packet printers.
diff --git a/print-mpls.c b/print-mpls.c
index f6ee434..ba42233 100644
--- a/print-mpls.c
+++ b/print-mpls.c
@@ -186,22 +186,22 @@
*/
if (pt == PT_UNKNOWN) {
if (!ndo->ndo_suppress_default_print)
- ND_DEFAULTPRINT(p, length - (p - bp));
+ ND_DEFAULTPRINT(p, length);
return;
}
ND_PRINT((ndo, ndo->ndo_vflag ? "\n\t" : " "));
switch (pt) {
case PT_IPV4:
- ip_print(ndo, p, length - (p - bp));
+ ip_print(ndo, p, length);
break;
case PT_IPV6:
- ip6_print(ndo, p, length - (p - bp));
+ ip6_print(ndo, p, length);
break;
case PT_OSI:
- isoclns_print(ndo, p, length - (p - bp), length - (p - bp));
+ isoclns_print(ndo, p, length, length);
break;
default: