Commit 39b56918 authored by Beniamino Galvani's avatar Beniamino Galvani

device: vlan: restart ARP announcement after we change MAC

After the parent MAC address changes and we update the VLAN MAC, also
restart ARP announcement to notify neighbors of the new address mapping.
parent b6b158e3
......@@ -43,6 +43,8 @@ enum NMActStageReturn {
#define NM_DEVICE_CAP_INTERNAL_MASK 0xc0000000
void nm_device_arp_announce (NMDevice *self);
NMSettings *nm_device_get_settings (NMDevice *self);
gboolean nm_device_set_ip_ifindex (NMDevice *self, int ifindex);
......
......@@ -127,6 +127,7 @@ parent_hwaddr_maybe_changed (NMDevice *parent,
NM_PRINT_FMT_QUOTE_STRING (new_mac));
if (new_mac) {
nm_device_hw_addr_set (device, new_mac, "vlan-parent", TRUE);
nm_device_arp_announce (device);
/* When changing the hw address the interface is taken down,
* removing the IPv6 configuration; reapply it.
*/
......
......@@ -9367,8 +9367,8 @@ arp_cleanup (NMDevice *self)
}
}
static void
arp_announce (NMDevice *self)
void
nm_device_arp_announce (NMDevice *self)
{
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
NMConnection *connection;
......@@ -9467,8 +9467,7 @@ activate_stage5_ip4_config_result (NMDevice *self)
NULL, NULL, NULL);
}
arp_announce (self);
nm_device_arp_announce (self);
nm_device_remove_pending_action (self, NM_PENDING_ACTION_DHCP4, FALSE);
/* Enter the IP_CHECK state if this is the first method to complete */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment