projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d0fe50
)
ipv4 : igmp : fix error handle in ip_mc_add_src()
author
Jun Zhao
<
[email protected]
>
Tue, 22 Nov 2011 17:19:03 +0000
(17:19 +0000)
committer
David S. Miller
<
[email protected]
>
Wed, 23 Nov 2011 22:31:39 +0000
(17:31 -0500)
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]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/igmp.c
patch
|
blob
|
history
diff --git
a/net/ipv4/igmp.c
b/net/ipv4/igmp.c
index c7472eff2d514b475579d1a3e5a89269d04fce0e..b2ca095cb9dab36a4eb6e8da7308c4e55a6437cc 100644
(file)
--- 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)) {