ipv4 : igmp : fix error handle in ip_mc_add_src()
Subsystems (3)
PATCH v3 1/1 ipv4 : igmp : fix error handle in ip_mc_add_src()
from: Jun Zhao <[email protected]>
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 <[email protected]>
Acked-by Eric Dumazet <[email protected]>
Signed-off-by Jun Zhao <[email protected]>
--- net/ipv4/igmp.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
net/ipv4/igmp.c +2 -1
@@ -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 )) {
Signature · 1 line
1.7.2.5
From: Jun Zhao <[email protected]>
Date: Wed, 23 Nov 2011 11:19:03 +0800
Quoted 8 lines
from: Jun Zhao <[email protected]>
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 <[email protected]>Acked-by Eric Dumazet <[email protected]>Signed-off-by Jun Zhao <[email protected]>
Applied, thanks.