Skip to content

ovs: fix handling of OVS interfaces with netdev datapath and cloned MAC

Beniamino Galvani requested to merge bg/ovs-netdev into main

Summary

If a ovs interface has the cloned-mac-address property set, we pass the desired MAC to ovsdb when creating the db entry, and openvswitch will eventually assign it to the interface.

Note that usually the link will not have the desired MAC when it's created. Therefore, currently we also change the MAC via netlink before proceeding with IP configuration. This is important to make sure that ARP announcements, DHCP client-id, etc. will use the correct MAC address.

This doesn't work when using the "netdev" (userspace) datapath, as the attempts to change the MAC of the tun interface via netlink fail, leading to an activation failure.

To properly handle both cases in the same way, adopt a different strategy: now we don't set the MAC address explicitly via netlink but we only wait until ovs does that.

https://issues.redhat.com/browse/RHEL-5886

Merge request reports

Loading