Commit ab627fcf authored by David Stevens's avatar David Stevens Committed by Stephen Hemminger

[IPV4/IPV6]: In MLD, add new filter first, then delete old one.

parent ccb41007
......@@ -1749,11 +1749,10 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct
goto done;
} else if (pmc->sfmode != omode) {
/* allow mode switches for empty-set filters */
ip_mc_add_src(in_dev, &mreqs->imr_multiaddr, omode, 0, 0, 0);
ip_mc_del_src(in_dev, &mreqs->imr_multiaddr, pmc->sfmode, 0,
0, 0);
pmc->sfmode = omode;
ip_mc_add_src(in_dev, &mreqs->imr_multiaddr, pmc->sfmode, 0,
0, 0);
}
psl = pmc->sflist;
......
......@@ -372,9 +372,9 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
goto done;
} else if (pmc->sfmode != omode) {
/* allow mode switches for empty-set filters */
ip6_mc_add_src(idev, group, omode, 0, 0, 0);
ip6_mc_del_src(idev, group, pmc->sfmode, 0, 0, 0);
pmc->sfmode = omode;
ip6_mc_del_src(idev, group, pmc->sfmode, 0, 0, 0);
}
psl = pmc->sflist;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment