]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
multicast: do not restore deleted record source filter mode to new one
authorHangbin Liu <liuhangbin@gmail.com>
Fri, 20 Jul 2018 06:04:27 +0000 (14:04 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:22 +0000 (14:20 +0100)
commit732480cbfbf1a2a3ac9cc267c315a730eb57f274
treea70c2fe9a13efa1f3a106c0198fe841ce0b49b3a
parent2beb8c20e48a8c1b91ee86b6c3b74c91c4de2ed6
multicast: do not restore deleted record source filter mode to new one

BugLink: http://bugs.launchpad.net/bugs/1814813
There are two scenarios that we will restore deleted records. The first is
when device down and up(or unmap/remap). In this scenario the new filter
mode is same with previous one. Because we get it from in_dev->mc_list and
we do not touch it during device down and up.

The other scenario is when a new socket join a group which was just delete
and not finish sending status reports. In this scenario, we should use the
current filter mode instead of restore old one. Here are 4 cases in total.

old_socket        new_socket       before_fix       after_fix
  IN(A)             IN(A)           ALLOW(A)         ALLOW(A)
  IN(A)             EX( )           TO_IN( )         TO_EX( )
  EX( )             IN(A)           TO_EX( )         ALLOW(A)
  EX( )             EX( )           TO_EX( )         TO_EX( )

Fixes: 24803f38a5c0b (igmp: do not remove igmp souce list info when set link down)
Fixes: 1666d49e1d416 (mld: do not remove mld souce list info when set link down)
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/ipv4/igmp.c
net/ipv6/mcast.c