Skip to content

Commit

Permalink
batman-adv: Fix broadcast/ogm queue limit on a removed interface
Browse files Browse the repository at this point in the history
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 <[email protected]>
[[email protected]: fix conflicts with current version]
Signed-off-by: Sven Eckelmann <[email protected]>
Signed-off-by: Marek Lindner <[email protected]>
Signed-off-by: Antonio Quartulli <[email protected]>
  • Loading branch information
T-X authored and ordex committed Apr 24, 2016
1 parent d1a65f1 commit c4fdb6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/batman-adv/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,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);
}
}
Expand Down Expand Up @@ -702,6 +705,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);
}
}
Expand Down

0 comments on commit c4fdb6c

Please sign in to comment.