bridge: vlan: signal if anything changed on vlan add
commitf418af6343fbfaaa3306e7cf15906be4f20c69ff
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fri, 27 Oct 2017 10:19:37 +0000 (27 13:19 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Oct 2017 02:03:43 +0000 (29 11:03 +0900)
treee5de5f4c488391973d2e1863bb1195f17e8c4879
parente19b42a1a0669ed5b8009930c5269a5a87cc363c
bridge: vlan: signal if anything changed on vlan add

Before this patch there was no way to tell if the vlan add operation
actually changed anything, thus we would always generate a notification
on adds. Let's make the notifications more precise and generate them
only if anything changed, so use the new bool parameter to signal that the
vlan was updated. We cannot return an error because there are valid use
cases that will be broken (e.g. overlapping range add) and also we can't
risk masking errors due to calls into drivers for vlan add which can
potentially return anything.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink.c
net/bridge/br_private.h
net/bridge/br_vlan.c