mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-01 12:00:53 +00:00
Initialize dhcp timers in tcpip_thread (if LWIP_DHCP) to protect the stack from concurrent access.
This commit is contained in:
parent
5eabd4591a
commit
a868832776
@ -45,6 +45,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bug fixes:
|
++ Bug fixes:
|
||||||
|
|
||||||
|
2007-03-06 Simon Goldschmidt
|
||||||
|
* tcpip.c: Initialize dhcp timers in tcpip_thread (if LWIP_DHCP) to protect
|
||||||
|
the stack from concurrent access.
|
||||||
|
|
||||||
2007-03-06 Frédéric Bernon, Dmitry Potapov
|
2007-03-06 Frédéric Bernon, Dmitry Potapov
|
||||||
* tcpip.c, ip_frag.c, ethernetif.c: Fix some build problems, and a redundancy
|
* tcpip.c, ip_frag.c, ethernetif.c: Fix some build problems, and a redundancy
|
||||||
call to "lwip_stats.link.recv++;" in low_level_input() & ethernetif_input().
|
call to "lwip_stats.link.recv++;" in low_level_input() & ethernetif_input().
|
||||||
|
@ -102,6 +102,24 @@ arp_timer(void *arg)
|
|||||||
sys_timeout( ARP_TMR_INTERVAL, arp_timer, NULL);
|
sys_timeout( ARP_TMR_INTERVAL, arp_timer, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LWIP_DHCP
|
||||||
|
static void
|
||||||
|
dhcp_timer_coarse(void *arg)
|
||||||
|
{
|
||||||
|
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip: dhcp_coarse_tmr()\n"));
|
||||||
|
dhcp_coarse_tmr();
|
||||||
|
sys_timeout(DHCP_COARSE_TIMER_SECS*1000, dhcp_timer_coarse, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
dhcp_timer_fine(void *arg)
|
||||||
|
{
|
||||||
|
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip: dhcp_fine_tmr()\n"));
|
||||||
|
dhcp_fine_tmr();
|
||||||
|
sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ETHARP_TCPIP_ETHINPUT
|
#if ETHARP_TCPIP_ETHINPUT
|
||||||
static void
|
static void
|
||||||
ethernet_input(struct pbuf *p, struct netif *netif)
|
ethernet_input(struct pbuf *p, struct netif *netif)
|
||||||
@ -146,6 +164,10 @@ tcpip_thread(void *arg)
|
|||||||
sys_timeout( IP_TMR_INTERVAL, ip_timer, NULL);
|
sys_timeout( IP_TMR_INTERVAL, ip_timer, NULL);
|
||||||
#endif
|
#endif
|
||||||
sys_timeout( ARP_TMR_INTERVAL, arp_timer, NULL);
|
sys_timeout( ARP_TMR_INTERVAL, arp_timer, NULL);
|
||||||
|
#if LWIP_DHCP
|
||||||
|
sys_timeout(DHCP_COARSE_TIMER_SECS*1000, dhcp_timer_coarse, NULL);
|
||||||
|
sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (tcpip_init_done != NULL) {
|
if (tcpip_init_done != NULL) {
|
||||||
tcpip_init_done(tcpip_init_done_arg);
|
tcpip_init_done(tcpip_init_done_arg);
|
||||||
|
Loading…
Reference in New Issue
Block a user