summaryrefslogtreecommitdiff
path: root/print-gre.c
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2017-01-11 12:54:45 +0000
committerFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2017-01-18 09:16:41 +0100
commit857ec6e800ec772f5a6b9f76268d189d70f000b6 (patch)
treed6119bd58fc53c09d398ef64ed4e3102446382ed /print-gre.c
parent0db4dcafe5ae38201d3869c96a96cb714d82ff35 (diff)
downloadtcpdump-857ec6e800ec772f5a6b9f76268d189d70f000b6.tar.gz
pass correct caplen to other functions as well
In ethertype_print(), isoclns_print() and snap_print() adjust the length arithmetics along the same lines as for ether_print() in the previous commit. Where done, the current pointer is not greater than snapend so that the difference (i.e. caplen) is never negative. This does not fix a reported issue but the problem was very likely to be there.
Diffstat (limited to 'print-gre.c')
-rw-r--r--print-gre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/print-gre.c b/print-gre.c
index e0f60c94..505752a1 100644
--- a/print-gre.c
+++ b/print-gre.c
@@ -226,7 +226,7 @@ gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length)
atalk_print(ndo, bp, len);
break;
case ETHERTYPE_GRE_ISO:
- isoclns_print(ndo, bp, len, len);
+ isoclns_print(ndo, bp, len, ndo->ndo_snapend - bp);
break;
case ETHERTYPE_TEB:
ether_print(ndo, bp, len, ndo->ndo_snapend - bp, NULL, NULL);