aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorZoltan Kiss <schaman@sch.bme.hu>2011-07-24 09:09:30 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-25 19:16:00 -0400
commitb76d0789c92a816a5539dc14232a700b8d62a53a (patch)
treec02aa02ecf856ae9429d11007ff7e7e722371537 /net/ipv4
parent32019e651c6fcee6bad6b6adb171feea5af0d16b (diff)
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>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/devinet.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 37b3c188d8b3..bc19bd06dd00 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,
1134 struct in_device *in_dev) 1134 struct in_device *in_dev)
1135 1135
1136{ 1136{
1137 struct in_ifaddr *ifa = in_dev->ifa_list; 1137 struct in_ifaddr *ifa;
1138
1139 if (!ifa)
1140 return;
1141 1138
1142 arp_send(ARPOP_REQUEST, ETH_P_ARP, 1139 for (ifa = in_dev->ifa_list; ifa;
1143 ifa->ifa_local, dev, 1140 ifa = ifa->ifa_next) {
1144 ifa->ifa_local, NULL, 1141 arp_send(ARPOP_REQUEST, ETH_P_ARP,
1145 dev->dev_addr, NULL); 1142 ifa->ifa_local, dev,
1143 ifa->ifa_local, NULL,
1144 dev->dev_addr, NULL);
1145 }
1146} 1146}
1147 1147
1148/* Called only under RTNL semaphore */ 1148/* Called only under RTNL semaphore */