]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: mcast: Fix incomplete MDB dump
authorIdo Schimmel <idosch@nvidia.com>
Fri, 11 Sep 2020 13:24:47 +0000 (16:24 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Sep 2020 21:49:47 +0000 (14:49 -0700)
commitb6397d019080356afbd6cdbf2a4453dea182f38f
treefc8566e2ef0c3011820862bde248fb1d4a0d0202
parent90747c271b047fe0483e8c5628f3c50954ab0229
bridge: mcast: Fix incomplete MDB dump

Each MDB entry is encoded in a nested netlink attribute called
'MDBA_MDB_ENTRY'. In turn, this attribute contains another nested
attributed called 'MDBA_MDB_ENTRY_INFO', which encodes a single port
group entry within the MDB entry.

The cited commit added the ability to restart a dump from a specific
port group entry. However, on failure to add a port group entry to the
dump the entire MDB entry (stored in 'nest2') is removed, resulting in
missing port group entries.

Fix this by finalizing the MDB entry with the partial list of already
encoded port group entries.

Fixes: 542c17108e2b ("net: bridge: mcast: add support for src list and filter mode dumping")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_mdb.c