Wireshark-bugs: [Wireshark-bugs] [Bug 2631] B.A.T.M.A.N. Advanced dissector
Date: Wed, 23 Jul 2008 04:48:21 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2631


Jeff Morriss <jeff.morriss.ws@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jeff.morriss.ws@xxxxxxxxx




--- Comment #17 from Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>  2008-07-23 04:48:20 PDT ---
I took a look at this and I have to say I'm not a fan of having so many files
for what is essentially one dissector.  But anyway, one thing I noticed is:

+       length_remaining = tvb_length_remaining(tvb, offset);
+
+       if (length_remaining != 0) {
+               next_tvb = tvb_new_subset(tvb, offset, length_remaining,
length_remaining);
+
+               if (have_tap_listener(batadv_follow_tap)) {
+                       tap_queue_packet(batadv_follow_tap, pinfo, next_tvb);
+               }
+
+               call_dissector(eth_handle, next_tvb, pinfo, tree);

I think you probably want to incorporate the result of
tvb_reported_length_remaining() so that if we didn't capture the entire packet
(e.g., if a snapshot length is used) the packets will show up as truncated
instead of malformed.


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.