astate);
}
-void
+static void
arp_announce(struct arp_state *astate)
{
struct iarp_state *state;
{
struct arp_state *astate;
- if (ifp->flags & IFF_NOARP)
+ if (ifp->flags & IFF_NOARP || !(ifp->options->options & DHCPCD_ARP))
return NULL;
astate = arp_find(ifp, ia);
void arp_packet(struct interface *, uint8_t *, size_t, unsigned int);
struct arp_state *arp_new(struct interface *, const struct in_addr *);
void arp_probe(struct arp_state *);
-void arp_announce(struct arp_state *);
struct arp_state *arp_announceaddr(struct dhcpcd_ctx *, const struct in_addr *);
struct arp_state *arp_ifannounceaddr(struct interface *, const struct in_addr *);
void arp_cancel(struct arp_state *);
state->new_len = state->offer_len;
get_lease(ifp, &state->lease, state->new, state->new_len);
ipv4_applyaddr(ifp);
+ if (ifp->ctx->options & DHCPCD_FORKED)
+ return;
state->new = bootp;
state->new_len = len;
}
dhcp_close(ifp);
ipv4_applyaddr(ifp);
+ if (ifp->ctx->options & DHCPCD_FORKED)
+ return;
/* If not in master mode, open an address specific socket. */
if (ctx->options & DHCPCD_MASTER ||
if (state != NULL && state->added) {
rt_build(ifp->ctx, AF_INET);
#ifdef ARP
- arp_announceaddr(ifp->ctx, &state->addr->addr);
+ if (ifp->options->options & DHCPCD_ARP)
+ arp_announceaddr(ifp->ctx, &state->addr->addr);
#endif
}
}
/* Announce the preferred address to
* kick ARP caches. */
arp_announceaddr(ifp->ctx,&lease->addr);
+ if (ifp->ctx->options & DHCPCD_FORKED)
+ return;
#endif
}
script_runreason(ifp, state->reason);
#ifdef ARP
arp_announceaddr(ifp->ctx, &state->addr->addr);
+ if (ifp->ctx->options & DHCPCD_FORKED)
+ return;
#endif
if (state->state == DHS_BOUND) {