mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 18:00:18 +01:00
Revert "device: restart DHCP when the MAC changes"
The commit causes problems with bridges. When a new port is attached the MAC of the bridge possibly changes and if we restart DHCP the bridge will get a different IP address. Revert the change until a better solution to the original problem is found. This reverts commit905adabdba. https://bugzilla.redhat.com/show_bug.cgi?id=2124443 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1401 (cherry picked from commit9819738607)
This commit is contained in:
parent
4a85225c2c
commit
f9db4f4604
1 changed files with 3 additions and 6 deletions
|
|
@ -6657,7 +6657,6 @@ device_link_changed(gpointer user_data)
|
|||
NMDeviceClass *klass = NM_DEVICE_GET_CLASS(self);
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
gboolean ip_ifname_changed = FALSE;
|
||||
gboolean hw_addr_changed;
|
||||
nm_auto_nmpobj const NMPObject *pllink_keep_alive = NULL;
|
||||
const NMPlatformLink *pllink;
|
||||
const char *str;
|
||||
|
|
@ -6704,9 +6703,9 @@ device_link_changed(gpointer user_data)
|
|||
if (ifindex == nm_device_get_ip_ifindex(self))
|
||||
_stats_update_counters_from_pllink(self, pllink);
|
||||
|
||||
had_hw_addr = (priv->hw_addr != NULL);
|
||||
hw_addr_changed = nm_device_update_hw_address(self);
|
||||
got_hw_addr = (!had_hw_addr && priv->hw_addr);
|
||||
had_hw_addr = (priv->hw_addr != NULL);
|
||||
nm_device_update_hw_address(self);
|
||||
got_hw_addr = (!had_hw_addr && priv->hw_addr);
|
||||
nm_device_update_permanent_hw_address(self, FALSE);
|
||||
|
||||
if (pllink->name[0] && !nm_streq(priv->iface, pllink->name)) {
|
||||
|
|
@ -6757,8 +6756,6 @@ device_link_changed(gpointer user_data)
|
|||
/* Update DHCP, etc, if needed */
|
||||
if (ip_ifname_changed)
|
||||
nm_device_update_dynamic_ip_setup(self, "IP interface changed");
|
||||
else if (hw_addr_changed)
|
||||
nm_device_update_dynamic_ip_setup(self, "hw-address changed");
|
||||
|
||||
was_up = priv->up;
|
||||
priv->up = NM_FLAGS_HAS(pllink->n_ifi_flags, IFF_UP);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue