* [PATCH 1/1] IPv4: Send gratuitous ARP for secondary IP addresses also
@ 2011-07-24 23:09 Zoltan, Kiss
2011-07-25 23:16 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Zoltan, Kiss @ 2011-07-24 23:09 UTC (permalink / raw)
To: David S. Miller, Alexey Kuznetsov, Pekka Savola, James Morris,
Hideaki YOSHIFUJI
Cc: linux-kernel, Zoltan Kiss
From: Zoltan Kiss <schaman@sch.bme.hu>
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>
---
net/ipv4/devinet.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 37b3c18..bc19bd0 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1134,15 +1134,15 @@ static void inetdev_send_gratuitous_arp(struct net_device *dev,
struct in_device *in_dev)
{
- struct in_ifaddr *ifa = in_dev->ifa_list;
-
- if (!ifa)
- return;
+ struct in_ifaddr *ifa;
- arp_send(ARPOP_REQUEST, ETH_P_ARP,
- ifa->ifa_local, dev,
- ifa->ifa_local, NULL,
- dev->dev_addr, NULL);
+ for (ifa = in_dev->ifa_list; ifa;
+ ifa = ifa->ifa_next) {
+ arp_send(ARPOP_REQUEST, ETH_P_ARP,
+ ifa->ifa_local, dev,
+ ifa->ifa_local, NULL,
+ dev->dev_addr, NULL);
+ }
}
/* Called only under RTNL semaphore */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/1] IPv4: Send gratuitous ARP for secondary IP addresses also
2011-07-24 23:09 [PATCH 1/1] IPv4: Send gratuitous ARP for secondary IP addresses also Zoltan, Kiss
@ 2011-07-25 23:16 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-07-25 23:16 UTC (permalink / raw)
To: schaman; +Cc: kuznet, pekkas, jmorris, yoshfuji, kaber, netdev, linux-kernel
From: "Zoltan, Kiss" <schaman@sch.bme.hu>
Date: Mon, 25 Jul 2011 01:09:30 +0200
> From: Zoltan Kiss <schaman@sch.bme.hu>
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-25 23:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-24 23:09 [PATCH 1/1] IPv4: Send gratuitous ARP for secondary IP addresses also Zoltan, Kiss
2011-07-25 23:16 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox