Skip to content

Commit 7d512c4

Browse files
authored
IPv6: DHCP6 & NTP fix (lwIP fix from David J. Fiddes [email protected]) (esp8266#5649)
* +dhcp6_set_ntp_servers (lwIP patch from David J. Fiddes [email protected])
1 parent 3f267bd commit 7d512c4

11 files changed

+12
-6
lines changed

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

2.39 KB
Binary file not shown.

tools/sdk/lib/liblwip2-1460.a

1.86 KB
Binary file not shown.

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

2.39 KB
Binary file not shown.

tools/sdk/lib/liblwip2-536.a

1.86 KB
Binary file not shown.

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

4.79 KB
Binary file not shown.

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

4.79 KB
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-11-g87c709d"
4+
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.1"
55
#endif // LWIP_HASH_H

tools/sdk/lwip2/include/lwip/apps/sntp.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ void sntp_setservername(u8_t idx, const char *server);
6767
const char *sntp_getservername(u8_t idx);
6868
#endif /* SNTP_SERVER_DNS */
6969

70-
#if SNTP_GET_SERVERS_FROM_DHCP
70+
#if SNTP_GET_SERVERS_FROM_DHCP || SNTP_GET_SERVERS_FROM_DHCPV6
7171
void sntp_servermode_dhcp(int set_servers_from_dhcp);
72-
#else /* SNTP_GET_SERVERS_FROM_DHCP */
72+
#else /* SNTP_GET_SERVERS_FROM_DHCP || SNTP_GET_SERVERS_FROM_DHCPV6 */
7373
#define sntp_servermode_dhcp(x)
74-
#endif /* SNTP_GET_SERVERS_FROM_DHCP */
74+
#endif /* SNTP_GET_SERVERS_FROM_DHCP || SNTP_GET_SERVERS_FROM_DHCPV6 */
7575

7676
#ifdef __cplusplus
7777
}

tools/sdk/lwip2/include/lwip/apps/sntp_opts.h

+6
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@
6767
#define SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV
6868
#endif
6969

70+
/** Set this to 1 to implement the callback function called by dhcpv6 when
71+
* NTP servers are received. */
72+
#if !defined SNTP_GET_SERVERS_FROM_DHCPV6 || defined __DOXYGEN__
73+
#define SNTP_GET_SERVERS_FROM_DHCPV6 LWIP_DHCP6_GET_NTP_SRV
74+
#endif
75+
7076
/** Set this to 1 to support DNS names (or IP address strings) to set sntp servers
7177
* One server address/name can be defined as default if SNTP_SERVER_DNS == 1:
7278
* \#define SNTP_SERVER_ADDRESS "pool.ntp.org"

tools/sdk/lwip2/include/lwipopts.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2705,7 +2705,7 @@
27052705
* void dhcp6_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs);
27062706
*/
27072707
#if !defined LWIP_DHCP6_GET_NTP_SRV || defined __DOXYGEN__
2708-
#define LWIP_DHCP6_GET_NTP_SRV 0 // with 1: dhcp6_set_ntp_servers() must be implemented
2708+
#define LWIP_DHCP6_GET_NTP_SRV 1 // with 1: dhcp6_set_ntp_servers() must be implemented
27092709
#endif
27102710

27112711
/**

0 commit comments

Comments
 (0)