bond: restore MAC on release only when there is a cloned MAC address
Currently we unconditionally reset the MAC to the previous value after releasing ports. This has some disadvantages:
-
by default, after the last port is removed the bond will have one of the previous port's address, which could conflict with the port;
-
in some cases, changing the bond MAC is not possible. For example when the bond is active-backup and has fail_over_mac=1|2. In such case the netlink call succeeds, but the address doesn't change; then NM would keep waiting for some time.
Don't try to restore the MAC unless the bond connection has a cloned MAC set.