summaryrefslogtreecommitdiff
path: root/include/math-emu
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2014-05-26 19:21:39 +0400
committerAntonio Quartulli <antonio@meshcoding.com>2014-08-05 11:12:16 +0400
commitd9124268d84a836f14a6ead54ff9d8eee4c43be5 (patch)
treed7fde990c3b172d0f85d2d78e8662556d97c5c15 /include/math-emu
parent4f933f414bf629852f361edf0fc5e765e3e78388 (diff)
downloadlinux-d9124268d84a836f14a6ead54ff9d8eee4c43be5.tar.xz
batman-adv: Fix out-of-order fragmentation support
batadv_frag_insert_packet was unable to handle out-of-order packets because it dropped them directly. This is caused by the way the fragmentation lists is checked for the correct place to insert a fragmentation entry. The fragmentation code keeps the fragments in lists. The fragmentation entries are kept in descending order of sequence number. The list is traversed and each entry is compared with the new fragment. If the current entry has a smaller sequence number than the new fragment then the new one has to be inserted before the current entry. This ensures that the list is still in descending order. An out-of-order packet with a smaller sequence number than all entries in the list still has to be added to the end of the list. The used hlist has no information about the last entry in the list inside hlist_head and thus the last entry has to be calculated differently. Currently the code assumes that the iterator variable of hlist_for_each_entry can be used for this purpose after the hlist_for_each_entry finished. This is obviously wrong because the iterator variable is always NULL when the list was completely traversed. Instead the information about the last entry has to be stored in a different variable. This problem was introduced in 610bfc6bc99bc83680d190ebc69359a05fc7f605 ("batman-adv: Receive fragmented packets and merge"). Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'include/math-emu')
0 files changed, 0 insertions, 0 deletions