All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Lindner <mareklindner@neomailbox.ch>
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 1/2] batman-adv: purge bridge loop avoidance when its disabled
Date: Tue, 17 Nov 2015 16:01:27 +0800	[thread overview]
Message-ID: <1571436.PpFx5574Ye@voltaire> (raw)
In-Reply-To: <1447082453-13117-2-git-send-email-sw@simonwunderlich.de>

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

On Monday, November 09, 2015 16:20:52 Simon Wunderlich wrote:
> -BATADV_ATTR_SIF_BOOL(bridge_loop_avoidance, S_IRUGO | S_IWUSR, NULL);
> +BATADV_ATTR_SIF_BOOL(bridge_loop_avoidance, S_IRUGO | S_IWUSR,
> +                    batadv_bla_status_update);
>  #endif

Are we sure this is correct ? The post function is called whether or not there 
actually was a change in the setting. The check in __batadv_store_bool_attr() 
is this:

ret = batadv_store_bool_attr(buff, count, net_dev, attr->name,
                                     attr_store);
if (post_func && ret)
            post_func(net_dev);

Let's ignore for now that ret should be changed to check for '> 0' to avoid 
calling post_func() in case of an error. The return value is always non-
negative unless the input is broken. You could enable BLA while it already is 
enabled which would reset all claim tables. Is that intended ?

Cheers,
Marek

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

  reply	other threads:[~2015-11-17  8:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 15:20 [B.A.T.M.A.N.] [PATCH 0/2] Bridge loop avoidance startup fixes Simon Wunderlich
2015-11-09 15:20 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: purge bridge loop avoidance when its disabled Simon Wunderlich
2015-11-17  8:01   ` Marek Lindner [this message]
2015-11-17 12:00     ` Simon Wunderlich
2015-11-21 21:42   ` Marek Lindner
2015-11-09 15:20 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: increase BLA wait periods to 6 Simon Wunderlich
2015-11-21 21:43   ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: increase BLA wait periods to6 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=1571436.PpFx5574Ye@voltaire \
    --to=mareklindner@neomailbox.ch \
    --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.