Skip to content
Commit 0ec92a8f authored by Piotr Gardocki's avatar Piotr Gardocki Committed by Jakub Kicinski
Browse files

net: fix net device address assign type



Commit ad72c4a0 introduced optimization to return from function
quickly if the MAC address is not changing at all. It was reported
that such change causes dev->addr_assign_type to not change
to NET_ADDR_SET from _PERM or _RANDOM.
Restore the old behavior and skip only call to ndo_set_mac_address.

Fixes: ad72c4a0 ("net: add check for current MAC address in dev_set_mac_address")
Reported-by: default avatarGal Pressman <gal@nvidia.com>
Signed-off-by: default avatarPiotr Gardocki <piotrx.gardocki@intel.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20230621132106.991342-1-piotrx.gardocki@intel.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9a14f2e3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment