Skip to content

ip4-config: preserve infinite lifetimes when merging addresses

Lubomir Rintel requested to merge lr/perfer-permanent-addr into main

When an address from DHCP is being added, while a same address with src kernel exists, the lifetime from former is used, because it's presumably more accurate.

This causes trouble when the connection has a manually set address and gets the same one from DHCP. Initially, a manually set address (with src user and permanent lifetime) would take precedence. However, after the restart the address would be discovered with src kernel and as soon as a DHCP lease is renewed its lifetime would be lowered.

I'm not entirely sure this is the right solution, but preventing tampering from permanent lifetimes seems to do the trick.

https://bugzilla.redhat.com/show_bug.cgi?id=2013921

Merge request reports