All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch v2 1/1] fix error handle in ip_mc_add_src()
@ 2011-11-21 16:05 Jun Zhao
  2011-11-22 21:22 ` David Miller
  2011-11-23  8:25 ` ShanWei
  0 siblings, 2 replies; 5+ messages in thread
From: Jun Zhao @ 2011-11-21 16:05 UTC (permalink / raw)
  To: davem; +Cc: Eric Dumazet, netdev, David Stevens

from: Jun Zhao <mypopydev@gmail.com>

When add sources to interface failure, need to roll back the sfcount[MODE] 
to before state. We need to match it corresponding. 

Acked-by: David L Stevens <dlstevens@us.ibm.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
---
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index c7472ef..b2ca095 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1716,7 +1716,8 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode,
        if (err) {
                int j;
 
-               pmc->sfcount[sfmode]--;
+               if (!delta)
+                       pmc->sfcount[sfmode]--;
                for (j=0; j<i; j++)
                        (void) ip_mc_del1_src(pmc, sfmode, &psfsrc[j]);
        } else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE] != 0)) {

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

* Re: [patch v2 1/1] fix error handle in ip_mc_add_src()
  2011-11-21 16:05 [patch v2 1/1] fix error handle in ip_mc_add_src() Jun Zhao
@ 2011-11-22 21:22 ` David Miller
  2011-11-22 23:08   ` Jun Zhao
  2011-11-23  8:25 ` ShanWei
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2011-11-22 21:22 UTC (permalink / raw)
  To: mypopydev; +Cc: eric.dumazet, netdev, dlstevens

From: Jun Zhao <mypopydev@gmail.com>
Date: Tue, 22 Nov 2011 00:05:16 +0800

> from: Jun Zhao <mypopydev@gmail.com>
> 
> When add sources to interface failure, need to roll back the sfcount[MODE] 
> to before state. We need to match it corresponding. 
> 
> Acked-by: David L Stevens <dlstevens@us.ibm.com>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Jun Zhao <mypopydev@gmail.com>

Please use an appropriate prefix in your subject line after the
closing "]" bracket.  For example, something like "ipv4: " for this
specific patch is fine.

Your patch has also been corrupted by your email client, it turned tab
characters into spaces amongst other things.  Please correct this,
email a test patch to yourself, and make absolutely sure you are able
to successfully apply it before you retry submitting your fix here.

Thank you.

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

* Re: [patch v2 1/1] fix error handle in ip_mc_add_src()
  2011-11-22 21:22 ` David Miller
@ 2011-11-22 23:08   ` Jun Zhao
  0 siblings, 0 replies; 5+ messages in thread
From: Jun Zhao @ 2011-11-22 23:08 UTC (permalink / raw)
  To: David Miller; +Cc: eric.dumazet, netdev, dlstevens

On Tue, 2011-11-22 at 16:22 -0500, David Miller wrote:
> From: Jun Zhao <mypopydev@gmail.com>
> Date: Tue, 22 Nov 2011 00:05:16 +0800
> 
> > from: Jun Zhao <mypopydev@gmail.com>
> > 
> > When add sources to interface failure, need to roll back the sfcount[MODE] 
> > to before state. We need to match it corresponding. 
> > 
> > Acked-by: David L Stevens <dlstevens@us.ibm.com>
> > Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
> > Signed-off-by: Jun Zhao <mypopydev@gmail.com>
> 
> Please use an appropriate prefix in your subject line after the
> closing "]" bracket.  For example, something like "ipv4: " for this
> specific patch is fine.
> 
> Your patch has also been corrupted by your email client, it turned tab
> characters into spaces amongst other things.  Please correct this,
> email a test patch to yourself, and make absolutely sure you are able
> to successfully apply it before you retry submitting your fix here.
> 
> Thank you.

Ok, I will double-check this according to your comments, after that,
re-submit the patch, Tks.

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

* Re: [patch v2 1/1] fix error handle in ip_mc_add_src()
  2011-11-21 16:05 [patch v2 1/1] fix error handle in ip_mc_add_src() Jun Zhao
  2011-11-22 21:22 ` David Miller
@ 2011-11-23  8:25 ` ShanWei
  2011-11-23  9:04   ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: ShanWei @ 2011-11-23  8:25 UTC (permalink / raw)
  To: Jun Zhao; +Cc: davem, Eric Dumazet, netdev, David Stevens

Jun Zhao said, at 2011/11/22 0:05:
> from: Jun Zhao<mypopydev@gmail.com>
>
> When add sources to interface failure, need to roll back the sfcount[MODE]
> to before state. We need to match it corresponding.
>
> Acked-by: David L Stevens<dlstevens@us.ibm.com>
> Acked-by: Eric Dumazet<eric.dumazet@gmail.com>
> Signed-off-by: Jun Zhao<mypopydev@gmail.com>
> ---
> diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
> index c7472ef..b2ca095 100644
> --- a/net/ipv4/igmp.c
> +++ b/net/ipv4/igmp.c
> @@ -1716,7 +1716,8 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode,
>          if (err) {
>                  int j;
>
> -               pmc->sfcount[sfmode]--;
> +               if (!delta)
> +                       pmc->sfcount[sfmode]--;

Tab is changed to space by your email client.

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

* Re: [patch v2 1/1] fix error handle in ip_mc_add_src()
  2011-11-23  8:25 ` ShanWei
@ 2011-11-23  9:04   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2011-11-23  9:04 UTC (permalink / raw)
  To: davidshan; +Cc: mypopydev, eric.dumazet, netdev, dlstevens

From: ShanWei <davidshan@foxmail.com>
Date: Wed, 23 Nov 2011 16:25:01 +0800

> Tab is changed to space by your email client.

He knows, that's why he posted v3 already.

:-)

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

end of thread, other threads:[~2011-11-23  9:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-21 16:05 [patch v2 1/1] fix error handle in ip_mc_add_src() Jun Zhao
2011-11-22 21:22 ` David Miller
2011-11-22 23:08   ` Jun Zhao
2011-11-23  8:25 ` ShanWei
2011-11-23  9:04   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.