All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: bugfix for dat optimiziation patch
Date: Fri, 26 Feb 2016 17:10:54 +0100	[thread overview]
Message-ID: <2122610.W8SJPdlrko@bentobox> (raw)
In-Reply-To: <1456492768-29861-1-git-send-email-apape@phoenixcontact.com>

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

On Friday 26 February 2016 14:19:28 Andreas Pape wrote:
> Make sure that claiming of devices due to dat handling is only done
> for non-local mac addresses. As dat is handled after the normal bla
> code this does not break the roaming client scenario for bla.
> 
> Signed-off-by: Andreas Pape <apape@phoenixcontact.com>
> ---
>  net/batman-adv/bridge_loop_avoidance.c |   18 ++++++++++++------
>  1 files changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
> index 739f80f..32a6168 100644
> --- a/net/batman-adv/bridge_loop_avoidance.c
> +++ b/net/batman-adv/bridge_loop_avoidance.c
> @@ -1959,13 +1959,19 @@ bool batadv_bla_handle_local_claim(struct batadv_priv *bat_priv,
>  					primary_if->net_dev->dev_addr))
>  			ret = false;
>  	} else {
> -		/* If there is no claim, claim the device */
> -		batadv_dbg(BATADV_DBG_BLA, bat_priv,
> -			   "Handle claim locally for currently not claimed mac %pM.\n",
> -			   search_claim.addr);
> +		/* If there is no claim, claim the device
> +		 * but only if this isn't a mac address
> +		 * out of the local tt
> +		 */
> +		if (!batadv_is_my_client(bat_priv, addr, vid)) {
> +			batadv_dbg(BATADV_DBG_BLA, bat_priv,
> +				   "bla_handle_local_claim(): Handle claim locally for currently not claimed mac %pM.\n",
> +				   search_claim.addr);
> 
> -		batadv_handle_claim(bat_priv, primary_if,
> -				    primary_if->net_dev->dev_addr, addr, vid);
> +			batadv_handle_claim(bat_priv, primary_if,
> +					    primary_if->net_dev->dev_addr,
> +					    addr, vid);
> +		}
>  	}

What do you think about inverting the check and as jump to out when
batadv_is_my_client(bat_priv, addr, vid) is true?

The debug output change looks like it should be in patch 5/7.

Kind regards,
	Sven

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

  reply	other threads:[~2016-02-26 16:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 13:19 [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: bugfix for dat optimiziation patch Andreas Pape
2016-02-26 16:10 ` Sven Eckelmann [this message]
2016-03-10 14:58 ` Simon Wunderlich

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=2122610.W8SJPdlrko@bentobox \
    --to=sven@narfation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.