Subject: Re: [PATCH RFC iproute2-next] iplink: allow to change iplink value

From: Stephen Hemminger <[email-masked]>
Date: Sun, 11 Apr 2021 10:04:11 -0700

On Sat, 10 Apr 2021 15:34:50 +0200
Ansuel Smith <[email-masked]> wrote:

> Allow to change the interface to which a given interface is linked to.
> This is useful in the case of multi-CPU port DSA, for changing the CPU
> port of a given user port.
> 
> Signed-off-by: Marek Behún <[email-masked]>
> Cc: David Ahern <[email-masked]>
> Cc: Stephen Hemminger <[email-masked]>

This may work for DSA but it won't work for all the device types vlan/macsec/... that
now use the link attribute.  It looks like the change link handling for those
device types just ignores the link attribute (maybe ok). But before supporting this
as an API, it would be better if all the other drivers that use IFLA_LINK
had error checks in their change link handling.

Please add error checks in kernel first.