Re: [PATCH 2/5] rtnetlink: skip namespace change if already effect

From: Nicolas Dichtel
Date: Tue Nov 05 2019 - 10:42:37 EST


Le 05/11/2019 Ã 09:11, Jonas Bonn a ÃcritÂ:
> RTM_SETLINK uses IFA_TARGET_NETNSID both as a selector for the device to
> act upon and as a selection of the namespace to move a device in the
> current namespace to. As such, one ends up in the code path for setting
> the namespace every time one calls setlink on a device outside the
> current namespace. This has the unfortunate side effect of setting the
> 'modified' flag on the device for every pass, resulting in Netlink
> notifications even when nothing was changed.
>
> This patch just makes the namespace switch dependent upon the namespace
> the device currently resides in.
>
> Signed-off-by: Jonas Bonn <jonas@xxxxxxxxxxx>
Acked-by: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx>