From: Roy Marples Date: Tue, 15 Dec 2015 22:51:36 +0000 (+0000) Subject: Send gratuitous ARP each time we apply our IP address. X-Git-Tag: v6.10.0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45be0cb988df01493629a6fbacae99e8204bac45;p=thirdparty%2Fdhcpcd.git Send gratuitous ARP each time we apply our IP address. --- diff --git a/dhcp.c b/dhcp.c index 274db05a..c75ba552 100644 --- a/dhcp.c +++ b/dhcp.c @@ -1936,8 +1936,6 @@ dhcp_arp_probed(struct arp_state *astate) if (astate->iface->ctx->options & DHCPCD_FORKED) return; - arp_announce(astate); - /* Stop IPv4LL now we have a working DHCP address */ ipv4ll_drop(astate->iface); diff --git a/ipv4.c b/ipv4.c index a3a4f737..fcc9b2e0 100644 --- a/ipv4.c +++ b/ipv4.c @@ -1166,6 +1166,13 @@ ipv4_applyaddr(void *arg) * notification right now via our link socket. */ if_initrt(ifp); ipv4_buildroutes(ifp->ctx); + /* Announce the address */ + if (ifo->options & DHCPCD_ARP) { + struct arp_state *astate; + + if ((astate = arp_new(ifp, &state->addr)) != NULL) + arp_announce(astate); + } if (state->state == DHS_BOUND) { script_runreason(ifp, state->reason); dhcpcd_daemonise(ifp->ctx);