b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <lindner_marek@yahoo.de>
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: free neighbors when an interface is deactivated
Date: Sat, 15 Jan 2011 15:52:53 +0100	[thread overview]
Message-ID: <1295103173-7036-1-git-send-email-lindner_marek@yahoo.de> (raw)

hardif_disable_interface() calls purge_orig_ref() to immediately free
all neighbors associated with the interface that is going down.
purge_orig_neighbors() checked if the interface status is IF_INACTIVE
which is set to IF_NOT_IN_USE shortly before calling purge_orig_ref().

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
 batman-adv/hard-interface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/batman-adv/hard-interface.c b/batman-adv/hard-interface.c
index 4f95777..52b2b72 100644
--- a/batman-adv/hard-interface.c
+++ b/batman-adv/hard-interface.c
@@ -398,7 +398,6 @@ void hardif_disable_interface(struct batman_if *batman_if)
 
 	kfree(batman_if->packet_buff);
 	batman_if->packet_buff = NULL;
-	batman_if->if_status = IF_NOT_IN_USE;
 
 	/* delete all references to this batman_if */
 	purge_orig_ref(bat_priv);
@@ -410,6 +409,7 @@ void hardif_disable_interface(struct batman_if *batman_if)
 		softif_destroy(batman_if->soft_iface);
 
 	batman_if->soft_iface = NULL;
+	batman_if->if_status = IF_NOT_IN_USE;
 }
 
 static struct batman_if *hardif_add_interface(struct net_device *net_dev)
-- 
1.7.2.3


             reply	other threads:[~2011-01-15 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-15 14:52 Marek Lindner [this message]
2011-01-16 10:27 ` [B.A.T.M.A.N.] [PATCH] batman-adv: free neighbors when an interface is deactivated Marek Lindner
2011-01-19 19:13   ` 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=1295103173-7036-1-git-send-email-lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).