From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Sven Eckelmann <sven@narfation.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix out-of-order fragmentation support
Date: Sat, 14 Jun 2014 09:40:27 +0800 [thread overview]
Message-ID: <5635074.nDv1YWok5K@diderot> (raw)
In-Reply-To: <1401117699-24587-1-git-send-email-sven@narfation.org>
[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]
On Monday 26 May 2014 17:21:39 Sven Eckelmann wrote:
> 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 9b3eab61754d74a93c9840c296013fe3b4a1b606
> ("batman-adv: Receive fragmented packets and merge").
>
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> Patch was only build-tested
> ---
> fragmentation.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
Applied in revision 4c525d3.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-06-14 1:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 15:21 [B.A.T.M.A.N.] [PATCH] batman-adv: Fix out-of-order fragmentation support Sven Eckelmann
2014-06-14 1:40 ` Marek Lindner [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-08-04 15:47 [B.A.T.M.A.N.] pull request net: batman-adv 2014-08-04 Antonio Quartulli
2014-08-04 15:47 ` [B.A.T.M.A.N.] [PATCH] batman-adv: Fix out-of-order fragmentation support Antonio Quartulli
2014-08-04 16:26 ` Sven Eckelmann
2014-08-05 7:17 ` Antonio Quartulli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5635074.nDv1YWok5K@diderot \
--to=mareklindner@neomailbox.ch \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=sven@narfation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox