* [PATCH v3] ipv4 : igmp : fix error handle in ip_mc_add_src()
@ 2011-11-23 3:19 Jun Zhao
2011-11-23 22:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jun Zhao @ 2011-11-23 3:19 UTC (permalink / raw)
To: davem; +Cc: eric.dumazet, dlstevens, netdev, Jun Zhao
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>
---
net/ipv4/igmp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
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)) {
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] ipv4 : igmp : fix error handle in ip_mc_add_src()
2011-11-23 3:19 [PATCH v3] ipv4 : igmp : fix error handle in ip_mc_add_src() Jun Zhao
@ 2011-11-23 22:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-11-23 22:32 UTC (permalink / raw)
To: mypopydev; +Cc: eric.dumazet, dlstevens, netdev
From: Jun Zhao <mypopydev@gmail.com>
Date: Wed, 23 Nov 2011 11:19:03 +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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-23 22:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 3:19 [PATCH v3] ipv4 : igmp : fix error handle in ip_mc_add_src() Jun Zhao
2011-11-23 22:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).