提交 b76d0789 编写于 作者: Z Zoltan Kiss 提交者: David S. Miller

IPv4: Send gratuitous ARP for secondary IP addresses also

If a device event generates gratuitous ARP messages, only primary
address is used for sending. This patch iterates through the whole
list. Tested with 2 IP addresses configuration on bonding interface.
Signed-off-by: NZoltan Kiss <schaman@sch.bme.hu>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 32019e65
...@@ -1134,15 +1134,15 @@ static void inetdev_send_gratuitous_arp(struct net_device *dev, ...@@ -1134,15 +1134,15 @@ static void inetdev_send_gratuitous_arp(struct net_device *dev,
struct in_device *in_dev) struct in_device *in_dev)
{ {
struct in_ifaddr *ifa = in_dev->ifa_list; struct in_ifaddr *ifa;
if (!ifa)
return;
arp_send(ARPOP_REQUEST, ETH_P_ARP, for (ifa = in_dev->ifa_list; ifa;
ifa->ifa_local, dev, ifa = ifa->ifa_next) {
ifa->ifa_local, NULL, arp_send(ARPOP_REQUEST, ETH_P_ARP,
dev->dev_addr, NULL); ifa->ifa_local, dev,
ifa->ifa_local, NULL,
dev->dev_addr, NULL);
}
} }
/* Called only under RTNL semaphore */ /* Called only under RTNL semaphore */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册