aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeefe Liu <liuqifa@huawei.com>2018-05-14 07:38:09 -0400
committerDavid S. Miller <davem@davemloft.net>2018-05-16 11:59:41 -0400
commitab452c3ce7bacb27ffe2fc0144aecd0c399e1e24 (patch)
treecc4e69c6986ae0e8bd41d264156bb6b36dc7e0a3
parentf3002c1374fb2367c9d8dbb28852791ef90d2bac (diff)
ipvlan: call netdevice notifier when master mac address changed
When master device's mac has been changed, the commit 32c10bbfe914 ("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>
-rw-r--r--drivers/net/ipvlan/ipvlan_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index 450eec264a5e..4377c26f714d 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -792,8 +792,10 @@ static int ipvlan_device_event(struct notifier_block *unused,
792 break; 792 break;
793 793
794 case NETDEV_CHANGEADDR: 794 case NETDEV_CHANGEADDR:
795 list_for_each_entry(ipvlan, &port->ipvlans, pnode) 795 list_for_each_entry(ipvlan, &port->ipvlans, pnode) {
796 ether_addr_copy(ipvlan->dev->dev_addr, dev->dev_addr); 796 ether_addr_copy(ipvlan->dev->dev_addr, dev->dev_addr);
797 call_netdevice_notifiers(NETDEV_CHANGEADDR, ipvlan->dev);
798 }
797 break; 799 break;
798 800
799 case NETDEV_PRE_TYPE_CHANGE: 801 case NETDEV_PRE_TYPE_CHANGE: