batman-adv: reset broadcast flood protection on error

Message ID 1305396082-30309-1-git-send-email-lindner_marek@yahoo.de (mailing list archive)
State Accepted, archived
Commit e19eec39f76a2716a5737146acf875c02bde68c0
Headers

Commit Message

Marek Lindner May 14, 2011, 6:01 p.m. UTC
  The broadcast flood protection should be reset to its original value
if the primary interface could not be retrieved.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
 send.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
  

Comments

Sven Eckelmann May 14, 2011, 6:08 p.m. UTC | #1
Marek Lindner wrote:
> The broadcast flood protection should be reset to its original value
> if the primary interface could not be retrieved.
> 
> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
> ---
>  send.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/send.c b/send.c
> index 76daa46..3377927 100644
> --- a/send.c
> +++ b/send.c
> @@ -421,7 +421,7 @@ int add_bcast_packet_to_list(struct bat_priv *bat_priv,
> struct sk_buff *skb)
> 
>  	primary_if = primary_if_get_selected(bat_priv);
>  	if (!primary_if)
> -		goto out;
> +		goto out_and_inc;
> 
>  	forw_packet = kmalloc(sizeof(struct forw_packet), GFP_ATOMIC);


Acked-by: Sven Eckelmann <sven@narfation.org>
  
Marek Lindner May 15, 2011, 4:27 p.m. UTC | #2
On Saturday 14 May 2011 20:08:20 Sven Eckelmann wrote:
> >       primary_if = primary_if_get_selected(bat_priv);
> >       if (!primary_if)
> >
> > -             goto out;
> > +             goto out_and_inc;
> >
> > 
> >       forw_packet = kmalloc(sizeof(struct forw_packet), GFP_ATOMIC);
> 
> Acked-by: Sven Eckelmann <sven@narfation.org>

Applied in revision 49eb173.

Regards,
Marek
  

Patch

diff --git a/send.c b/send.c
index 76daa46..3377927 100644
--- a/send.c
+++ b/send.c
@@ -421,7 +421,7 @@  int add_bcast_packet_to_list(struct bat_priv *bat_priv, struct sk_buff *skb)
 
 	primary_if = primary_if_get_selected(bat_priv);
 	if (!primary_if)
-		goto out;
+		goto out_and_inc;
 
 	forw_packet = kmalloc(sizeof(struct forw_packet), GFP_ATOMIC);