[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] Missing 'dhcp6_set_ntp_servers()'
From: |
Gisle Vanem |
Subject: |
[lwip-devel] Missing 'dhcp6_set_ntp_servers()' |
Date: |
Thu, 16 Aug 2018 15:14:16 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
When experimenting with IPv6 and most features enabled
(including 'LWIP_DHCP6_GET_NTP_SRV=1'), I get a
link error:
dhcp6.obj : error LNK2019: unresolved external symbol
_dhcp6_set_ntp_servers referenced in function _dhcp6_recv
I'm not sure if the NTP-address in dhcp6_recv() is always an
IPv6-address, so just patched it like this:
--- a/src/apps/sntp/sntp.c 2018-04-26 13:57:15
+++ b/src/apps/sntp/sntp.c 2018-08-16 11:38:48
@@ -816,6 +816,15 @@
}
#endif /* LWIP_DHCP && SNTP_GET_SERVERS_FROM_DHCP */
+#if LWIP_DHCP6_GET_NTP_SRV
+void
+dhcp6_set_ntp_servers(u8_t num, const ip_addr_t *server)
+{
+ (void) server;
+ LWIP_DEBUGF(SNTP_DEBUG_TRACE, ("sntp: got NTP server #%u via DHCPv6\n",
num));
+}
+#endif
+
-------
This works in my Windows test-app since I use lwIP as a static-lib.
This patch fails if my app uses a lwIP.dll.
But IMHO it's strange that a lwipcore6 file should call into an
APPFILE like this. Same issue with 'LWIP_DHCP_GET_NTP_SRV=1' in
'core/ipv4/dhcp.c'.
Perhaps there should be 2 func-pointers defined in lwIP for
sntp.c to hook into?
--
--gv
--
--gv
- [lwip-devel] Missing 'dhcp6_set_ntp_servers()',
Gisle Vanem <=