1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-07 16:23:38 +03:00

lwip2 fixes: turn off random delay before sntp request (#5567)

+update dhcp6 patch: update ip_addr_set_zero_ip6 to use IP_SET_TYPE_VAL, avoiding compilation warning
This commit is contained in:
david gauchard 2018-12-29 22:40:39 +01:00 committed by Develo
parent 62b8ac6be7
commit b26c19e82e
9 changed files with 13 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
// generated by makefiles/make-lwip2-hash // generated by makefiles/make-lwip2-hash
#ifndef LWIP_HASH_H #ifndef LWIP_HASH_H
#define LWIP_HASH_H #define LWIP_HASH_H
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.0-6-g4670dfc" #define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.0-9-g56e0410"
#endif // LWIP_HASH_H #endif // LWIP_HASH_H

View File

@ -169,7 +169,7 @@ extern const ip_addr_t ip_addr_any_type;
ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }while(0) ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }while(0)
/** @ingroup ip6addr */ /** @ingroup ip6addr */
#define ip_addr_set_zero_ip6(ipaddr) do{ \ #define ip_addr_set_zero_ip6(ipaddr) do{ \
ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }while(0) ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE_VAL(*ipaddr, IPADDR_TYPE_V6); }while(0)
/** @ingroup ipaddr */ /** @ingroup ipaddr */
#define ip_addr_set_any(is_ipv6, ipaddr) do{if(is_ipv6){ \ #define ip_addr_set_any(is_ipv6, ipaddr) do{if(is_ipv6){ \
ip6_addr_set_any(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \ ip6_addr_set_any(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \

View File

@ -3555,6 +3555,17 @@
#define SNTP_MAX_SERVERS 3 #define SNTP_MAX_SERVERS 3
#endif #endif
// turn off random delay before sntp request
// when SNTP_STARTUP_DELAY is not defined,
// LWIP_RAND is used to set a delay
// from sntp_opts.h:
/** According to the RFC, this shall be a random delay
* between 1 and 5 minutes (in milliseconds) to prevent load peaks.
* This can be defined to a random generation function,
* which must return the delay in milliseconds as u32_t.
*/
#define SNTP_STARTUP_DELAY 0
/* /*
-------------------------------------------------- --------------------------------------------------
------------------- LOCAL FIXES ------------------ ------------------- LOCAL FIXES ------------------