b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix broadcast queue limit on a removed interface
@ 2013-04-17 21:54 Linus Lüssing
  2013-04-17 21:54 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Refactor forward packet creation/destruction Linus Lüssing
  2013-04-17 22:08 ` [B.A.T.M.A.N.] [PATCHv2 1/2] batman-adv: Fix broadcast/ogm queue limit on a removed interface Linus Lüssing
  0 siblings, 2 replies; 6+ messages in thread
From: Linus Lüssing @ 2013-04-17 21:54 UTC (permalink / raw)
  To: b.a.t.m.a.n

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 <linus.luessing@web.de>
---
 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);
 		}
 	}
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-09 16:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-17 21:54 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix broadcast queue limit on a removed interface Linus Lüssing
2013-04-17 21:54 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Refactor forward packet creation/destruction Linus Lüssing
2016-03-10 17:08   ` Sven Eckelmann
2016-04-09 16:23     ` Sven Eckelmann
2013-04-17 22:08 ` [B.A.T.M.A.N.] [PATCHv2 1/2] batman-adv: Fix broadcast/ogm queue limit on a removed interface Linus Lüssing
2016-03-10 17:44   ` Sven Eckelmann

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).