Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 685f94e6 authored by Jun Zhao's avatar Jun Zhao Committed by David S. Miller
Browse files

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: default avatarDavid L Stevens <dlstevens@us.ibm.com>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarJun Zhao <mypopydev@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4d0fe50c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1716,6 +1716,7 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode,
	if (err) {
		int j;

		if (!delta)
			pmc->sfcount[sfmode]--;
		for (j=0; j<i; j++)
			(void) ip_mc_del1_src(pmc, sfmode, &psfsrc[j]);