Re: [PATCHv2 net] bridge: check iface upper dev when setting master via ioctl

2018-04-29 Thread David Miller
From: Hangbin Liu Date: Fri, 27 Apr 2018 20:59:24 +0800 > When we set a bond slave's master to bridge via ioctl, we only check > the IFF_BRIDGE_PORT flag. Although we will find the slave's real master > at netdev_master_upper_dev_link() later, it already does some settings > and allocates some re

Re: [PATCHv2 net] bridge: check iface upper dev when setting master via ioctl

2018-04-28 Thread Nikolay Aleksandrov
On 27/04/18 15:59, Hangbin Liu wrote: When we set a bond slave's master to bridge via ioctl, we only check the IFF_BRIDGE_PORT flag. Although we will find the slave's real master at netdev_master_upper_dev_link() later, it already does some settings and allocates some resources. It would be bette

[PATCHv2 net] bridge: check iface upper dev when setting master via ioctl

2018-04-27 Thread Hangbin Liu
When we set a bond slave's master to bridge via ioctl, we only check the IFF_BRIDGE_PORT flag. Although we will find the slave's real master at netdev_master_upper_dev_link() later, it already does some settings and allocates some resources. It would be better to return as early as possible. v1 ->