From patchwork Wed Apr 17 21:54:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 2945 X-Patchwork-Delegate: mareklindner@neomailbox.ch Return-Path: Received: from mout.web.de (mout.web.de [212.227.17.12]) by open-mesh.org (Postfix) with ESMTP id 155CE601F85 for ; Wed, 17 Apr 2013 23:54:37 +0200 (CEST) Received: from localhost ([130.225.247.83]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0LtFUV-1UYaiF2ngB-012OHR; Wed, 17 Apr 2013 23:54:36 +0200 From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 17 Apr 2013 23:54:32 +0200 Message-Id: <1366235673-13763-1-git-send-email-linus.luessing@web.de> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-Provags-ID: V02:K0:TksWgwzbNF2AqekA/38+cPZjqoNVXtlK5h7j1ctOQY4 KwP9CrbEehZQJpqpVxqdmNJJnivylWa8+IVZZ38G5utu9ETnm3 IUYJyfLhNp56HcsUKsq8d3OwTwvUh8YV2xzDbQhWOwmi4kxrkk 2LSMJhtTq0Yp3sWY9DWCaeTL7xRh/wQinj6UL7tzENLLY2SPEw 0ELQtkyPdmId9nfB2f/yQ== Subject: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix broadcast queue limit on a removed interface X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2013 21:54:37 -0000 When removing a single interface while a broadcast or ogm packet is still pending then we will free the forward packet without releasing the queue slots again. This patch is supposed to fix this issue. Signed-off-by: Linus Lüssing --- send.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/send.c b/send.c index ed7072a..2d539d6 100644 --- a/send.c +++ b/send.c @@ -356,6 +356,9 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv, if (pending) { hlist_del(&forw_packet->list); + if (!forw_packet->own) + atomic_inc(&bat_priv->bcast_queue_left); + batadv_forw_packet_free(forw_packet); } } @@ -382,6 +385,9 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv, if (pending) { hlist_del(&forw_packet->list); + if (!forw_packet->own) + atomic_inc(&bat_priv->batman_queue_left); + batadv_forw_packet_free(forw_packet); } }