Bugzilla – Bug 601
Small typo in SequenceControlSmaller (mac-rx-middle.cc)
Last modified: 2009-06-26 03:46:40 UTC
In the SequenceControlSmaller function found in the mac-rx-middle.cc file, there is a test: if (delta <= 0 && delta < -2048) { return true; } However, the second delta test is unnecessary. I'm thinking the second 'less than' sign should in fact be a 'greater than' sign...
See also: bug 385.
comments from mirko banchi Original expression is: if (delta <= 0 && delta < -2048) { ... } if delta = 0 it's not possible that delta < -2048 so we can remove =. However if delta < -2048 is true that delta < 0 too, so i think that that expression is equal to: if (delta < -2048) { ... } and it's wrong. Could make sense the suggested expression: if (delta <= 0 && delta > -2048) { ... } else if (delta >= 0 && delta < 2048) { ... } However, are those conditions enough to say that a sequence number corresponds to an "old" packet?
changeset 36adfa546b04 test+fix