Comment # 2
on bug 8502
from Roland Knall
(In reply to comment #1)
> I like the idea, some comments though.
> It seems as though you use 'frame number' and 'fragment number'
> interchangeably, I think you meant to settle on fragment number.
> You use camelBack for your variables, while the rest of the code uses
> underscores. Please keep it consistent that way.
> You could also add to reassemble_test.c
> What happens if frag_number is smaller than the offset? You then get an
> overlap?
I have cleaned up the patch, so that it will only make use of the name fragment
and fragment number. Also I used the underscores throughout.
I have not added a test to reassemble_test.c. I will add a patch for the
dissector I am working on (opensafety) as well as a new sample trace, and both
will demonstrate the use quite nicely. As soon as I find some time at work, I
will add the unittest to reassemble_test.
The whole idea is to start the offset with the first package, so the first
package must be identifiable by the dissector. An overlap is not intended, and
I have to think this case through. In theory an overlap can happen after the
first package, as the test in reassemble.c only checks, if the given fragment
number minus the offset is smaller than 0. In such a case the fragment number
will not be touched, and the fragment will be handled as if no offset would be
present.
A fragment number smaller than the offset would indicate a serious
misconfiguration of the reassemble function. So far I have not encountered it
using my dissector, even with test frames
You are receiving this mail because:
- You are watching all bug changes.