From: Jun Zhao Date: Tue, 22 Nov 2011 17:19:03 +0000 (+0000) Subject: ipv4 : igmp : fix error handle in ip_mc_add_src() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=685f94e6db8496399c881218018166515445a914;p=openwrt%2Fstaging%2Fblogic.git ipv4 : igmp : fix error handle in ip_mc_add_src() 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 Acked-by: Eric Dumazet Signed-off-by: Jun Zhao Signed-off-by: David S. Miller --- diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index c7472eff2d51..b2ca095cb9da 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; jsfcount[MCAST_EXCLUDE] != 0)) {