mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-30 14:42:34 +08:00
prevent dhcp from starting when netif link is down (only when LWIP_DHCP_CHECK_LINK_UP==1, which is disabled by default for compatibility reasons)
This commit is contained in:
@@ -161,9 +161,9 @@ void dhcp_fine_tmr(void);
|
||||
#define DHCP_REBINDING 4
|
||||
#define DHCP_RENEWING 5
|
||||
#define DHCP_SELECTING 6
|
||||
#define DHCP_INFORMING 7
|
||||
/* not yet implemented #define DHCP_INFORMING 7*/
|
||||
#define DHCP_CHECKING 8
|
||||
#define DHCP_PERMANENT 9
|
||||
/* not yet implemented #define DHCP_PERMANENT 9*/
|
||||
#define DHCP_BOUND 10
|
||||
/** not yet implemented #define DHCP_RELEASING 11 */
|
||||
#define DHCP_BACKING_OFF 12
|
||||
|
||||
@@ -751,6 +751,16 @@
|
||||
#define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LWIP_DHCP_CHECK_LINK_UP==1: dhcp_start() only really starts if the netif has
|
||||
* NETIF_FLAG_LINK_UP set in its flags. As this is only an optimization and
|
||||
* netif drivers might not set this flag, the default is off. If enabled,
|
||||
* netif_set_link_up() must be called to continue dhcp starting.
|
||||
*/
|
||||
#ifndef LWIP_DHCP_CHECK_LINK_UP
|
||||
#define LWIP_DHCP_CHECK_LINK_UP 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user