Dissect MIP extensions if the packet was claimed to have more data in it
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 29 Apr 2002 09:57:29 +0000 (09:57 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 29 Apr 2002 09:57:29 +0000 (09:57 +0000)
than the fixed-length stuff, even if that runs past the end of the
captured data, so if it *does* run past the end of the captured data, we
report a short frame.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5292 f5534014-38df-0310-8fa8-9805f1628bb7

packet-mip.c

index 51ba3057222f3f482354b1c6904bf0428cd35f71..6c2bd4ea76b018afbee052a565740b92ddcf41bd 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for Mobile IP dissection
  * Copyright 2000, Stefan Raab <sraab@cisco.com>
  *
- * $Id: packet-mip.c,v 1.28 2002/04/29 08:20:09 guy Exp $
+ * $Id: packet-mip.c,v 1.29 2002/04/29 09:57:29 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -378,7 +378,7 @@ dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   } /* End switch */
 
   if (tree) {
-       if (tvb_offset_exists(tvb, offset))
+       if (tvb_reported_length_remaining(tvb, offset) > 0)
          dissect_mip_extensions(tvb, offset, pinfo, mip_tree);
   }
 } /* dissect_mip */