From: Roy Marples Date: Tue, 8 Oct 2019 12:58:30 +0000 (+0100) Subject: ARP: Linux doesn't send a Gratuitous ARP for new addresses X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dd76830d8aa069addfe62266d4453d0540e4ecf;p=thirdparty%2Fdhcpcd.git ARP: Linux doesn't send a Gratuitous ARP for new addresses --- diff --git a/src/arp.c b/src/arp.c index 55b6203b..0d5a7381 100644 --- a/src/arp.c +++ b/src/arp.c @@ -438,15 +438,20 @@ arp_announce1(void *arg) astate->claims, ANNOUNCE_NUM); /* The kernel will send a Gratuitous ARP for newly added addresses. - * So we can avoid sending the same. */ + * So we can avoid sending the same. + * Linux is special and doesn't send one. */ ia = ipv4_iffindaddr(ifp, &astate->addr, NULL); +#ifndef __linux__ if (astate->claims == 1 && ia != NULL && ia->flags & IPV4_AF_NEW) goto skip_request; +#endif if (arp_request(ifp, &astate->addr, &astate->addr) == -1) logerr(__func__); +#ifndef __linux__ skip_request: +#endif /* No longer a new address. */ if (ia != NULL) ia->flags |= ~IPV4_AF_NEW;