lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 12 May 2018 19:00:37 +0800 From: <liuqifa@...wei.com> To: <davem@...emloft.net>, <dsahern@...il.com>, <maheshb@...gle.com>, <weiyongjun1@...wei.com>, <maowenan@...wei.com>, <dingtianhong@...wei.com>, <liuqifa@...wei.com> CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org> Subject: [PATCH] ipvlan: flush arp table when mac address changed From: Keefe Liu <liuqifa@...wei.com> 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 flush the IPVlan's arp table. Signed-off-by: Keefe Liu <liuqifa@...wei.com> --- drivers/net/ipvlan/ipvlan_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c index 450eec2..a1edfe1 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c @@ -7,6 +7,8 @@ * */ +#include <net/neighbour.h> +#include <net/arp.h> #include "ipvlan.h" static unsigned int ipvlan_netid __read_mostly; @@ -792,8 +794,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); + neigh_changeaddr(&arp_tbl, ipvlan->dev); + } break; case NETDEV_PRE_TYPE_CHANGE: -- 1.8.3.1
Powered by blists - more mailing lists