From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Ruben Wisniewsi <ruben@vfn-nrw.de>
Subject: Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Avoid u32 overflow during gateway select
Date: Tue, 09 Jun 2015 22:43:47 +0800 [thread overview]
Message-ID: <2189944.odvLXYXy1N@voltaire> (raw)
In-Reply-To: <1432658067-14370-2-git-send-email-sven@narfation.org>
[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]
On Tuesday, May 26, 2015 18:34:27 Sven Eckelmann wrote:
> From: Ruben Wisniewski <ruben@freifunk-nrw.de>
>
> The gateway selection based on fast connections is using a single value
> calculated from the average tq (0-255) and the download bandwidth (in
> 100Kibit). The formula for the first step (tq ** 2 * 10000 * bandwidth)
> tends to overflow a u32 with low bandwidth settings like 50 [100KiBit]
> and a tq value of over 92.
>
> Changing this to a 64 bit unsigned integer allows to support a
> bandwidth_down with up to ~2.8e10 [100KiBit] and a perfect tq of 255. This
> is ~6.6 times higher than the maximum possible value of the gateway
> announcement TVLV.
>
> This problem only affects the non-default gw_sel_class 1.
>
> Signed-off-by: Ruben Wisniewsi <ruben@vfn-nrw.de>
> [sven@narfation.org: rewritten commit message, changed to kernel type]
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> I am sending this because Ruben Wisniewski didn't fix the commit message
> (yet) and my earlier patch broke his proposed one.
> ---
> net/batman-adv/gateway_client.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied in revision f63c54b.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-06-09 14:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 16:34 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Replace C99 int types with kernel type Sven Eckelmann
2015-05-26 16:34 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Avoid u32 overflow during gateway select Sven Eckelmann
2015-06-09 14:43 ` Marek Lindner [this message]
2015-06-09 14:25 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Replace C99 int types with kernel type Marek Lindner
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=2189944.odvLXYXy1N@voltaire \
--to=mareklindner@neomailbox.ch \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=ruben@vfn-nrw.de \
/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