state->new = state->offer;
state->new_len = state->offer_len;
get_lease(ifp, &state->lease, state->new, state->new_len);
- ipv4_applyaddr(astate->iface);
+ ipv4_applyaddr(ifp);
state->new = bootp;
state->new_len = len;
}
static void
dhcp_arp_found(struct arp_state *astate, const struct arp_msg *amsg)
{
+ struct in_addr addr;
#ifdef ARPING
struct interface *ifp;
struct dhcp_state *state;
}
#endif
- dhcp_addr_duplicated(astate->iface, &astate->addr);
+ addr = astate->addr;
+ arp_free(astate);
+ dhcp_addr_duplicated(astate->iface, &addr);
}
#ifdef KERNEL_RFC5227
}
static void
-ipv4ll_announced(struct arp_state *astate)
+ipv4ll_announced_arp(struct arp_state *astate)
{
struct ipv4ll_state *state = IPV4LL_STATE(astate->iface);
{
struct ipv4ll_state *state;
struct ipv4_addr *ia;
+#ifdef KERNEL_RFC5227
struct arp_state *astate;
+#endif
state = IPV4LL_STATE(ifp);
assert(state != NULL);
#ifdef KERNEL_RFC5227
astate = arp_new(ifp, &ia->addr);
if (astate != NULL) {
- astate->announced_cb = ipv4ll_announced;
+ astate->announced_cb = ipv4ll_announced_arp;
astate->free_cb = ipv4ll_arpfree;
arp_announce(astate);
}
#else
- arp_annnounce(state->arp);
+ arp_announce(state->arp);
#endif
script_runreason(ifp, "IPV4LL");
dhcpcd_daemonise(ifp->ctx);
{
struct interface *ifp;
struct ipv4ll_state *state;
- struct ipv4_addr *ia;
assert(astate != NULL);
assert(astate->iface != NULL);
state = IPV4LL_STATE(ifp);
assert(state != NULL);
assert(state->arp == astate);
- ipv4ll_not_found_arp(state);
+ ipv4ll_not_found_arp(astate);
}
static void
static void
ipv4ll_defend_failed_arp(struct arp_state *astate)
{
- struct ipv4ll_state *state = IPV4LL_STATE(astate->ifp);
+ struct ipv4ll_state *state = IPV4LL_STATE(astate->iface);
assert(state->arp == astate);
- ipv4ll_defend_failed1(astate->iface);
+ ipv4ll_defend_failed(astate->iface);
}
#endif