public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: martin@hundeboll.net
Subject: Re: [B.A.T.M.A.N.] [RFC] batman-adv: Calculate extra tail size based on queued fragments
Date: Mon, 01 Dec 2014 10:23:02 +0100	[thread overview]
Message-ID: <5581995.nEvZ9cQiNU@sven-edge> (raw)
In-Reply-To: <1417388720-5019-1-git-send-email-sven@narfation.org>

[-- Attachment #1: Type: text/plain, Size: 1845 bytes --]

On Monday 01 December 2014 00:05:20 Sven Eckelmann wrote:
> The fragmentation code was replaced in
> 9b3eab61754d74a93c9840c296013fe3b4a1b606 ("batman-adv: Receive fragmented
> packets and merge"). The new code provided a mostly unused parameter skb
> for the merging function. It is used inside the function to calculate the
> additionally needed skb tailroom. But instead of increasing its own
> tailroom, it is only increasing the tailroom of the first queued skb. This
> is not correct in most situations because the first queued entry can be a
> different one than the parameter.
> 
> An observed problem was:
> 
> 1. packet with size 104, total_size 1464, fragno 1 was received
>    - packet is queued
> 2. packet with size 1400, total_size 1464, fragno 0 was received
>    - packet is queued at the end of the list
> 3. enough data was received and can be given to the merge function
>    (1464 == (1400 - 20) + (104 - 20))
>    - merge functions gets 1400 byte large packet as skb argument
> 4. merge function gets first entry in queue (104 byte)
>    - stored as skb_out
> 5. merge function calculates the required extra tail as total_size -
> skb->len - pskb_expand_head tail of skb_out with 64 bytes
> 6. merge function tries to squeeze the extra 1380 bytes from the second
> queued skb (1400 byte aka skb parameter) in the 64 extra tail bytes of
> skb_out
> 
> Instead take only skbs from the queue to merge a packet and remove the
> problematic parameter.
> 
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> Reported-by: Philipp Psurek <philipp.psurek@gmail.com>
> ---

I thought a little bit about it and this RFC is too big for inclusion into the 
stable kernels. I would therefore propose to use the RFC-mini instead for 
maint and send the remaining changes as extra patches for master. Any 
comments?

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-12-01  9:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-30 23:05 [B.A.T.M.A.N.] [RFC] batman-adv: Calculate extra tail size based on queued fragments Sven Eckelmann
2014-11-30 23:14 ` [B.A.T.M.A.N.] [RFC-mini] " Sven Eckelmann
2014-12-01  9:23 ` Sven Eckelmann [this message]
2014-12-01 18:01 ` [B.A.T.M.A.N.] [RFC] " Philipp Psurek
2014-12-01 18:36   ` Sven Eckelmann
2014-12-01 20:40     ` Philipp Psurek

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=5581995.nEvZ9cQiNU@sven-edge \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=martin@hundeboll.net \
    /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