public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix symmetry check / route flapping in multi interface setups
Date: Sun, 16 Sep 2012 12:12:50 +0200	[thread overview]
Message-ID: <20120916101250.GA7087@ritirata.org> (raw)
In-Reply-To: <1347745906-12749-1-git-send-email-linus.luessing@web.de>

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

On Sat, Sep 15, 2012 at 11:51:46 +0200, Linus Lüssing wrote:
> If receiving an OGM from a neighbor other than the currently selected
> and if it has the same TQ then we are supposed to switch if this
> neighbor provides a more symmetric link than the currently selected one.
> 
> However this symmetry check currently is broken if the interface of the
> neighbor we received the OGM from and the one of the currently selected
> neighbor differ: We are currently trying to determine the symmetry of the
> link towards the selected router via the link we received the OGM from
> instead of just checking via the link towards the currently selected
> router.
> 
> This leads to way more route switches than necessary and can lead to
> permanent route flapping in many common multi interface setups.
> 
> This patch fixes this issue by using the right interface for this
> symmetry check.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@web.de>
> ---
> This fixes the route flapping observed in ticket 163 (but unfortunately
> doesn't fix the main issue of this ticket, the starving routes, yet).
> 
>  bat_iv_ogm.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c
> index 7f0adad..2c6b560 100644
> --- a/bat_iv_ogm.c
> +++ b/bat_iv_ogm.c
> @@ -743,7 +743,8 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
>  	if (router && (neigh_node->tq_avg == router->tq_avg)) {
>  		orig_node_tmp = router->orig_node;
>  		spin_lock_bh(&orig_node_tmp->ogm_cnt_lock);
> -		sum_orig = orig_node_tmp->bcast_own_sum[if_incoming->if_num];
> +		sum_orig = orig_node_tmp->
> +				bcast_own_sum[router->if_incoming->if_num];

what about:
	int if_num;
	...
		if_num = router->if_incoming->if_num;
		sum_orig = orig_node_tmp->bcast_own_sum[if_num];

?

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2012-09-16 10:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-15 21:51 [B.A.T.M.A.N.] [PATCH] batman-adv: Fix symmetry check / route flapping in multi interface setups Linus Lüssing
2012-09-16 10:12 ` Antonio Quartulli [this message]
2012-09-18  1:01   ` [B.A.T.M.A.N.] [PATCHv2] " Linus Lüssing
2012-09-23  9:15     ` Marek Lindner
2012-09-23  9:16       ` [B.A.T.M.A.N.] [PATCHv3] " Marek Lindner
2012-09-23 10:44         ` "Linus Lüssing"
2012-09-23 15:18           ` 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=20120916101250.GA7087@ritirata.org \
    --to=ordex@autistici.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.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