Skip to content

Commit

Permalink
ipvlan: call netdevice notifier when master mac address changed
Browse files Browse the repository at this point in the history
When master device's mac has been changed, the commit
32c10bb ("ipvlan: always use the current L2 addr of the
master") makes the IPVlan devices's mac changed also, but it
doesn't do related works such as flush the IPVlan devices's
arp table.

Signed-off-by: Keefe Liu <liuqifa@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Keefe Liu authored and David S. Miller committed May 16, 2018
1 parent f3002c1 commit ab452c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ipvlan/ipvlan_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,10 @@ static int ipvlan_device_event(struct notifier_block *unused,
break;

case NETDEV_CHANGEADDR:
list_for_each_entry(ipvlan, &port->ipvlans, pnode)
list_for_each_entry(ipvlan, &port->ipvlans, pnode) {
ether_addr_copy(ipvlan->dev->dev_addr, dev->dev_addr);
call_netdevice_notifiers(NETDEV_CHANGEADDR, ipvlan->dev);
}
break;

case NETDEV_PRE_TYPE_CHANGE:
Expand Down

0 comments on commit ab452c3

Please sign in to comment.