]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Jul 2018 05:58:17 +0000 (22:58 -0700)
commit08d3ffcc0cfaba36f6b86fd568cc3bc773061fa6
tree52464f06f9bfb54a148f380eb244ed4d7f703159
parent3d82475ad46c0b65f2618b5f2bbb4cadbb5ac5d8
multicast: do not restore deleted record source filter mode to new one

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>
net/ipv4/igmp.c
net/ipv6/mcast.c