From f2f20cf1333cd9b90d4cce22595f38c808ad1116 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Tue, 25 Aug 2009 17:49:47 +0000 Subject: [PATCH] fixed invalid dependency to etharp_query if DHCP_DOES_ARP_CHECK==0 --- CHANGELOG | 3 +++ src/core/dhcp.c | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 82bf2a4e..16a3bd90 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -32,6 +32,9 @@ HISTORY ++ Bugfixes: + 2009-08-25 Simon Goldschmidt + * dhcp.c: fixed invalid dependency to etharp_query if DHCP_DOES_ARP_CHECK==0 + 2009-08-23 Simon Goldschmidt * ppp.c: bug #27078: Possible memory leak in pppInit() diff --git a/src/core/dhcp.c b/src/core/dhcp.c index 6e0ec290..c152b49a 100644 --- a/src/core/dhcp.c +++ b/src/core/dhcp.c @@ -109,9 +109,9 @@ static void dhcp_handle_offer(struct netif *netif); static err_t dhcp_discover(struct netif *netif); static err_t dhcp_select(struct netif *netif); -static void dhcp_check(struct netif *netif); static void dhcp_bind(struct netif *netif); #if DHCP_DOES_ARP_CHECK +static void dhcp_check(struct netif *netif); static err_t dhcp_decline(struct netif *netif); #endif /* DHCP_DOES_ARP_CHECK */ static err_t dhcp_rebind(struct netif *netif); @@ -178,6 +178,7 @@ dhcp_handle_nak(struct netif *netif) dhcp_discover(netif); } +#if DHCP_DOES_ARP_CHECK /** * Checks if the offered IP address is already in use. * @@ -207,6 +208,7 @@ dhcp_check(struct netif *netif) dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_check(): set request timeout %"U16_F" msecs\n", msecs)); } +#endif /* DHCP_DOES_ARP_CHECK */ /** * Remember the configuration offered by a DHCP server. @@ -396,6 +398,7 @@ dhcp_timeout(struct netif *netif) dhcp_release(netif); dhcp_discover(netif); } +#if DHCP_DOES_ARP_CHECK /* received no ARP reply for the offered address (which is good) */ } else if (dhcp->state == DHCP_CHECKING) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); @@ -407,6 +410,7 @@ dhcp_timeout(struct netif *netif) /* bind the interface to the offered address */ dhcp_bind(netif); } +#endif /* DHCP_DOES_ARP_CHECK */ } /* did not get response to renew request? */ else if (dhcp->state == DHCP_RENEWING) {