]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Kernel will send the 2nd annoucemnent when we add the address.
authorRoy Marples <roy@marples.name>
Fri, 30 May 2008 10:27:15 +0000 (10:27 +0000)
committerRoy Marples <roy@marples.name>
Fri, 30 May 2008 10:27:15 +0000 (10:27 +0000)
net.c

diff --git a/net.c b/net.c
index 5f74ac6c463509238bde717e45f24e438769eee7..7b3f73b1c51e88e05059caf00d8f9d41d28c32b2 100644 (file)
--- a/net.c
+++ b/net.c
@@ -715,12 +715,17 @@ arp_claim(struct interface *iface, struct in_addr address)
                        } else if (nclaims < ANNOUNCE_NUM) {
                                nclaims++;
                                timeout = ANNOUNCE_INTERVAL;
-                               logger(LOG_DEBUG, "sending ARP claim #%d",
-                                      nclaims);
-                               if (send_arp(iface, ARPOP_REQUEST,
-                                            address, iface->hwaddr,
-                                            address) == -1)
-                                       break;
+                               /* Kernel will send the last ARP when we add
+                                * the address. */
+                               if (nclaims < ANNOUNCE_NUM) {
+                                       logger(LOG_DEBUG,
+                                              "sending ARP claim #%d",
+                                              nclaims);
+                                       if (send_arp(iface, ARPOP_REQUEST,
+                                                    address, iface->hwaddr,
+                                                    address) == -1)
+                                               break;
+                               }
                        } else {
                                /* No replies, so done */
                                retval = 0;