mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 22:10:14 +01:00
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.
This commit is contained in:
parent
b6b158e310
commit
39b5691847
3 changed files with 6 additions and 4 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue