hsr: use upper/lower device infrastructure
netdev_upper_dev_link() is useful to manage lower/upper interfaces. And this function internally validates looping, maximum depth. All or most virtual interfaces that could have a real interface (e.g. macsec, macvlan, ipvlan etc.) use lower/upper infrastructure. Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
81390d0c4e
commit
e0a4b99773
@ -85,7 +85,8 @@ static int hsr_netdev_notify(struct notifier_block *nb, unsigned long event,
|
||||
master->dev->mtu = mtu_max;
|
||||
break;
|
||||
case NETDEV_UNREGISTER:
|
||||
hsr_del_port(port);
|
||||
if (!is_hsr_master(dev))
|
||||
hsr_del_port(port);
|
||||
break;
|
||||
case NETDEV_PRE_TYPE_CHANGE:
|
||||
/* HSR works only on Ethernet devices. Refuse slave to change
|
||||
|
Reference in New Issue
Block a user