public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@meshcoding.com>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Cc: Simon Wunderlich <simon@open-mesh.com>
Subject: Re: [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: initialize up/down values when adding a gateway
Date: Wed, 24 Jun 2015 21:05:02 +0200	[thread overview]
Message-ID: <558AFF5E.9020109@meshcoding.com> (raw)
In-Reply-To: <1435150220-25157-1-git-send-email-sw@simonwunderlich.de>

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

Nice catch!

On 24/06/15 14:50, Simon Wunderlich wrote:
> From: Simon Wunderlich <simon@open-mesh.com>
> 
> Without this initialization, gateways which actually announce up/down
> bandwidth of 0/0 could be added. If these nodes get purged later, the

as clarified on IRC here Simon was referring to the orig_node purge
routine (_batadv_purge_orig()) that calls batadv_gw_node_delete().

> gw_node structure does not get removed since batadv_gw_node_delete()
> updates the gw_node with up/down bandwidth of 0/0, and the updating
> function then discards the change and does not free gw_node.
> 

I have witnessed situations where nodes in the mesh receive GW TVLV
with bandwidth 0/0 even if it shouldn't be such. Therefore the situation
scenario described by Simon is more likely than what one might think.

I also think that we should investigate why we see this 0/0 announcement
when we should not. But this is for another thread ;)

> This results in leaking the gw_node structures, which references other
> structures: gw_node -> orig_node -> orig_node_ifinfo -> hardif. When
> removing the interface later, the open reference on the hardif may cause
> hangs with the infamous "unregister_netdevice: waiting for mesh1 to
> become free. Usage count = 1" message.
> 
> Signed-off-by: Simon Wunderlich <simon@open-mesh.com>

Acked-by: Antonio Quartulli <antonio@meshcoding.com>

Good job!

-- 
Antonio Quartulli


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2015-06-24 19:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 12:50 [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: initialize up/down values when adding a gateway Simon Wunderlich
2015-06-24 12:50 ` [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: remove broadcast packets scheduled for purged outgoing if Simon Wunderlich
2015-06-28 13:58   ` Marek Lindner
2015-06-24 19:05 ` Antonio Quartulli [this message]
2015-06-28 13:53 ` [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: initialize up/down values when adding a gateway 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=558AFF5E.9020109@meshcoding.com \
    --to=antonio@meshcoding.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=simon@open-mesh.com \
    /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