summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-05-26 15:13:19 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2018-05-29 11:18:30 +0200
commit39b56918471761930588bb63fcd54cbb8385c40d (patch)
tree102d9ec9c6a84e52a795d08279f177bd6da5fe41 /src
parentb6b158e310ac8e36788a2ddd75c92900be6c0390 (diff)
downloadNetworkManager-39b56918471761930588bb63fcd54cbb8385c40d.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/devices/nm-device-private.h2
-rw-r--r--src/devices/nm-device-vlan.c1
-rw-r--r--src/devices/nm-device.c7
3 files changed, 6 insertions, 4 deletions
diff --git a/src/devices/nm-device-private.h b/src/devices/nm-device-private.h
index b0d3ffa4f6..0b8444112a 100644
--- a/src/devices/nm-device-private.h
+++ b/src/devices/nm-device-private.h
@@ -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);
diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c
index 3069da2228..a7f4c4bce4 100644
--- a/src/devices/nm-device-vlan.c
+++ b/src/devices/nm-device-vlan.c
@@ -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.
*/
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index d133452b87..9a40a0dd5e 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -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 */