forked from luck/tmp_suning_uos_patched
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: Zoltan Kiss <schaman@sch.bme.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
32019e651c
commit
b76d0789c9
|
@ -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;
|
|
||||||
|
|
||||||
|
for (ifa = in_dev->ifa_list; ifa;
|
||||||
|
ifa = ifa->ifa_next) {
|
||||||
arp_send(ARPOP_REQUEST, ETH_P_ARP,
|
arp_send(ARPOP_REQUEST, ETH_P_ARP,
|
||||||
ifa->ifa_local, dev,
|
ifa->ifa_local, dev,
|
||||||
ifa->ifa_local, NULL,
|
ifa->ifa_local, NULL,
|
||||||
dev->dev_addr, NULL);
|
dev->dev_addr, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called only under RTNL semaphore */
|
/* Called only under RTNL semaphore */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user