net: bridge: add no_linklocal_learn bool option
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Sat, 24 Nov 2018 02:34:21 +0000 (04:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Nov 2018 23:04:15 +0000 (15:04 -0800)
commit70e4272b4c81828e7d942209bae83b9d92752cfe
tree4d3d081ba8776a1d67206c8c9d0ba4d1807e3092
parenta428afe82f98d2ffb31c981671630df1fa25906f
net: bridge: add no_linklocal_learn bool option

Use the new boolopt API to add an option which disables learning from
link-local packets. The default is kept as before and learning is
enabled. This is a simple map from a boolopt bit to a bridge private
flag that is tested before learning.

v2: pass NULL for extack via sysfs

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/if_bridge.h
net/bridge/br.c
net/bridge/br_input.c
net/bridge/br_private.h
net/bridge/br_sysfs_br.c