]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ether.c
VERSION set for release
[tcpdump] / print-ether.c
index 59d15c24481a509f5c27fb9682fded67fca65a11..01dd11303841a8fec4725c6e25f1fbec7d8157c1 100644 (file)
@@ -126,6 +126,8 @@ ether_hdr_print(netdissect_options *ndo,
  * This might be encapsulated within another frame; we might be passed
  * a pointer to a function that can print header information for that
  * frame's protocol, and an argument to pass to that function.
+ *
+ * FIXME: caplen can and should be derived from ndo->ndo_snapend and p.
  */
 u_int
 ether_print(netdissect_options *ndo,
@@ -360,7 +362,11 @@ ethertype_print(netdissect_options *ndo,
                return (1);
 
        case ETHERTYPE_ISO:
-               isoclns_print(ndo, p + 1, length - 1, length - 1);
+               if (length == 0 || caplen == 0) {
+                       ND_PRINT((ndo, " [|osi]"));
+                       return (1);
+               }
+               isoclns_print(ndo, p + 1, length - 1);
                return(1);
 
        case ETHERTYPE_PPPOED:
@@ -433,7 +439,7 @@ ethertype_print(netdissect_options *ndo,
                return (1);
 
        case ETHERTYPE_MEDSA:
-               medsa_print(ndo, p, length, caplen);
+               medsa_print(ndo, p, length, caplen, src, dst);
                return (1);
 
        case ETHERTYPE_LAT: