All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Wunderlich <sw@simonwunderlich.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: prevent adding of loop detection mac addresses to global tt
Date: Thu, 01 Jun 2017 13:43:28 +0200	[thread overview]
Message-ID: <2546838.CaOxSCmaqC@prime> (raw)
In-Reply-To: <20170601085804.4756-1-apape@phoenixcontact.com>

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

On Thursday, June 1, 2017 10:58:04 AM CEST Andreas Pape wrote:
> This patch prevents that entries in the global translation table are
> generated for mac addresses used by loop detection frames.
> 
> Signed-off-by: Andreas Pape <apape@phoenixcontact.com>
> ---
>  net/batman-adv/translation-table.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/net/batman-adv/translation-table.c
> b/net/batman-adv/translation-table.c index e75b493..ca1e0f7 100644
> --- a/net/batman-adv/translation-table.c
> +++ b/net/batman-adv/translation-table.c
> @@ -1618,8 +1618,10 @@ static bool batadv_tt_global_add(struct batadv_priv
> *bat_priv, struct batadv_tt_common_entry *common;
>  	u16 local_flags;
> 
> -	/* ignore global entries from backbone nodes */
> -	if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig, vid))
> +	/* ignore global entries from backbone nodes or
> +	 * adding of entries related to loop detect frames */
> +	if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig, vid) ||
> +		batadv_bla_is_loopdetect_mac(tt_addr))
>  		return true;
> 
>  	tt_global_entry = batadv_tt_global_hash_find(bat_priv, tt_addr, vid);

Thank you for your patch.

I was thinking, if we implement it like this we may still have problems if an 
older batman-adv version is adding the ba:be mac addresses locally. This could 
create a problem, because the transmitted tt table is not added completely, 
thus the CRC will not match and will lead to a "TT request/response loop".

What do you think? Maybe we should only add it for the speedy join case, but 
accept it if a node really added these mac addresses locally?

Thanks,
      Simon

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

  reply	other threads:[~2017-06-01 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01  8:58 [B.A.T.M.A.N.] [PATCH] batman-adv: prevent adding of loop detection mac addresses to global tt Andreas Pape
2017-06-01 11:43 ` Simon Wunderlich [this message]
2017-06-01 14:48   ` [B.A.T.M.A.N.] Antwort: " Andreas Pape

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=2546838.CaOxSCmaqC@prime \
    --to=sw@simonwunderlich.de \
    --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.