Mercurial > hg > dhcpcd
changeset 4457:8e41e487831d draft
Linux: Fix compile
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Fri, 19 Apr 2019 09:07:13 +0100 |
| parents | 101b31471d89 |
| children | 0dcdae5e7954 |
| files | src/dhcp.c src/ipv4ll.c |
| diffstat | 2 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dhcp.c Thu Apr 18 18:05:56 2019 +0100 +++ b/src/dhcp.c Fri Apr 19 09:07:13 2019 +0100 @@ -2034,7 +2034,7 @@ 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; } @@ -2114,6 +2114,7 @@ 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; @@ -2147,7 +2148,9 @@ } #endif - dhcp_addr_duplicated(astate->iface, &astate->addr); + addr = astate->addr; + arp_free(astate); + dhcp_addr_duplicated(astate->iface, &addr); } #ifdef KERNEL_RFC5227
--- a/src/ipv4ll.c Thu Apr 18 18:05:56 2019 +0100 +++ b/src/ipv4ll.c Fri Apr 19 09:07:13 2019 +0100 @@ -173,7 +173,7 @@ } static void -ipv4ll_announced(struct arp_state *astate) +ipv4ll_announced_arp(struct arp_state *astate) { struct ipv4ll_state *state = IPV4LL_STATE(astate->iface); @@ -198,7 +198,9 @@ { struct ipv4ll_state *state; struct ipv4_addr *ia; +#ifdef KERNEL_RFC5227 struct arp_state *astate; +#endif state = IPV4LL_STATE(ifp); assert(state != NULL); @@ -235,12 +237,12 @@ #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); @@ -291,7 +293,6 @@ { struct interface *ifp; struct ipv4ll_state *state; - struct ipv4_addr *ia; assert(astate != NULL); assert(astate->iface != NULL); @@ -300,7 +301,7 @@ state = IPV4LL_STATE(ifp); assert(state != NULL); assert(state->arp == astate); - ipv4ll_not_found_arp(state); + ipv4ll_not_found_arp(astate); } static void @@ -316,10 +317,10 @@ 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
