Skip to content

Commit c4fdb6c

Browse files
T-Xordex
authored andcommitted
batman-adv: Fix broadcast/ogm queue limit on a removed interface
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. Fixes: 6d5808d ("batman-adv: Add missing hardif_free_ref in forw_packet_free") Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue> [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
1 parent d1a65f1 commit c4fdb6c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

net/batman-adv/send.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,9 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv,
675675

676676
if (pending) {
677677
hlist_del(&forw_packet->list);
678+
if (!forw_packet->own)
679+
atomic_inc(&bat_priv->bcast_queue_left);
680+
678681
batadv_forw_packet_free(forw_packet);
679682
}
680683
}
@@ -702,6 +705,9 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv,
702705

703706
if (pending) {
704707
hlist_del(&forw_packet->list);
708+
if (!forw_packet->own)
709+
atomic_inc(&bat_priv->batman_queue_left);
710+
705711
batadv_forw_packet_free(forw_packet);
706712
}
707713
}

0 commit comments

Comments
 (0)