Skip to content

prepare: don't expose the smimulated device to NM before it's set up

Lubomir Rintel requested to merge lr/bad-accept-ra into main

prepare_simdev() sets some sysctls on the simulated device. That would be okay, were it not for NetworkManager preferring the set them themselves.

There's a slim chance (not so slim on debug kernels it seems, perhaps due to them being slightly slower) that, by the time we set accept_ra to 1, NetworkManager has attempted to disable accept_ra and bring the device up. This way the device ends up being IFF_UP with the kernel beign configured to process RAs:

This is not good. Upon an actual arrival of a RA, kernel will assign an address, causing NetworkManager to assume the device to be externally configured (because it, in fact, is externally configured) and won't activate connections on it. Chaos and lawlessnes ensues.

This fixes the @ovs_cloned_mac_set_on_iface test.

Merge request reports