diff options
Diffstat (limited to 'net/batman-adv/send.c')
-rw-r--r-- | net/batman-adv/send.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c index 263cfd1ccee7..eb16b04d4bee 100644 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c | |||
@@ -260,6 +260,9 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work) | |||
260 | if (hard_iface->soft_iface != soft_iface) | 260 | if (hard_iface->soft_iface != soft_iface) |
261 | continue; | 261 | continue; |
262 | 262 | ||
263 | if (forw_packet->num_packets >= hard_iface->num_bcasts) | ||
264 | continue; | ||
265 | |||
263 | /* send a copy of the saved skb */ | 266 | /* send a copy of the saved skb */ |
264 | skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC); | 267 | skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC); |
265 | if (skb1) | 268 | if (skb1) |
@@ -271,7 +274,7 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work) | |||
271 | forw_packet->num_packets++; | 274 | forw_packet->num_packets++; |
272 | 275 | ||
273 | /* if we still have some more bcasts to send */ | 276 | /* if we still have some more bcasts to send */ |
274 | if (forw_packet->num_packets < 3) { | 277 | if (forw_packet->num_packets < BATADV_NUM_BCASTS_MAX) { |
275 | _batadv_add_bcast_packet_to_list(bat_priv, forw_packet, | 278 | _batadv_add_bcast_packet_to_list(bat_priv, forw_packet, |
276 | msecs_to_jiffies(5)); | 279 | msecs_to_jiffies(5)); |
277 | return; | 280 | return; |