]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: switch order of rx_handler reg and upper dev link
authorJiri Pirko <jiri@resnulli.us>
Fri, 5 Sep 2014 13:51:28 +0000 (15:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Sep 2014 18:29:54 +0000 (11:29 -0700)
commitfb9914f3c9ec9466db05aa2ce8a5993c342ba327
tree2f3e7d978d92767ec7f3894f52f714ce7f8ab92f
parentf16345e3d52b6202ab6222f8e3179ee936c9e4f3
bridge: switch order of rx_handler reg and upper dev link

The thing is that netdev_master_upper_dev_link calls
call_netdevice_notifiers(NETDEV_CHANGEUPPER, dev). That generates rtnl
link message and during that, rtnl_link_ops->fill_slave_info is called.
But with current ordering, rx_handler and IFF_BRIDGE_PORT are not set
yet so there would have to be check for that in fill_slave_info callback.

Resolve this by reordering to similar what bonding and team does to
avoid the check.

Also add removal of IFF_BRIDGE_PORT flag into error path.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_if.c