Skip to content

Commit b26c19e

Browse files
d-a-vdevyte
authored andcommitted
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
1 parent 62b8ac6 commit b26c19e

9 files changed

+13
-2
lines changed

tools/sdk/lib/liblwip2-1460-feat.a

-3.74 KB
Binary file not shown.

tools/sdk/lib/liblwip2-1460.a

-3.71 KB
Binary file not shown.

tools/sdk/lib/liblwip2-536-feat.a

-3.74 KB
Binary file not shown.

tools/sdk/lib/liblwip2-536.a

-3.72 KB
Binary file not shown.

tools/sdk/lib/liblwip6-1460-feat.a

-652 Bytes
Binary file not shown.

tools/sdk/lib/liblwip6-536-feat.a

-652 Bytes
Binary file not shown.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// generated by makefiles/make-lwip2-hash
22
#ifndef LWIP_HASH_H
33
#define LWIP_HASH_H
4-
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.0-6-g4670dfc"
4+
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.0-9-g56e0410"
55
#endif // LWIP_HASH_H

tools/sdk/lwip2/include/lwip/ip_addr.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ extern const ip_addr_t ip_addr_any_type;
169169
ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }while(0)
170170
/** @ingroup ip6addr */
171171
#define ip_addr_set_zero_ip6(ipaddr) do{ \
172-
ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }while(0)
172+
ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE_VAL(*ipaddr, IPADDR_TYPE_V6); }while(0)
173173
/** @ingroup ipaddr */
174174
#define ip_addr_set_any(is_ipv6, ipaddr) do{if(is_ipv6){ \
175175
ip6_addr_set_any(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \

tools/sdk/lwip2/include/lwipopts.h

+11
Original file line numberDiff line numberDiff line change
@@ -3555,6 +3555,17 @@
35553555
#define SNTP_MAX_SERVERS 3
35563556
#endif
35573557

3558+
// turn off random delay before sntp request
3559+
// when SNTP_STARTUP_DELAY is not defined,
3560+
// LWIP_RAND is used to set a delay
3561+
// from sntp_opts.h:
3562+
/** According to the RFC, this shall be a random delay
3563+
* between 1 and 5 minutes (in milliseconds) to prevent load peaks.
3564+
* This can be defined to a random generation function,
3565+
* which must return the delay in milliseconds as u32_t.
3566+
*/
3567+
#define SNTP_STARTUP_DELAY 0
3568+
35583569
/*
35593570
--------------------------------------------------
35603571
------------------- LOCAL FIXES ------------------

0 commit comments

Comments
 (0)