Fix building unit tests via contrib/ports/unix/check on Debian 9, gcc 6.3.0.
Fixes:
<snip>/ip_addr.h:105:58: error: the comparison will always evaluate as ‘true’ for the address of ‘ip1’ will never be NULL [-Werror=address]
#define IP_SET_TYPE(ipaddr, iptype) do { if((ipaddr) != NULL) { IP_SET_TYPE_VAL(*(ipaddr),iptype); }}while(0)
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
(cherry picked from commit 2f098c42a7)
Use only one entropy/ctr_drbg context for all altcp_tls_config structure allocated.
(Small adjustments before committing: fix coding style, adapt to changes in master)
(cherry picked from commit b298afabdc)
The ssl context is not used on listening pcbs. This includes freeing
input/output buffers, so saves ~32KByte by default.
(cherry picked from commit 282389a332)
This is the default way for mbedTLS. Add entropy sources via defines (see
mbedtls_entropy_init).
This removes the use of ALTCP_MBEDTLS_RNG_FN
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
(cherry picked from commit 153c295b6f)
The only difference should be:
- LWIP_DEBUG enabled -> print a diag message
- LWIP_DEBUG disabled -> NO diag message is printed
(cherry picked from commit e479bd56df)
This adds support for RFC4075 SNTP server configuration via DHCPv6.
The DHCPv6 options transmitted are now conditional on how LwIP is
configured.
A new SNTP application option SNTP_GET_SERVERS_FROM_DHCPV6 is used
to enable. For simplicity this is configured to use the global
LWIP_DHCP6_GET_NTP_SRV configuration setting.
Tests:
- Check the global options now control the DHCPv6 request sent
in Wireshark
- Check against 0, 1 and 3 SNTP servers configured on an odhcpd
server configured to support RFC 4075 SNTP server lists.
Verify that the SNTP server list is updated on connection
establishment on an ESP8266 WeMOS D1.
- Verify that SNTP packets are sent and recieved from a
configured server and that system time is updated.
Signed-off-by: David J. Fiddes <D.J@fiddes.net>
(cherry picked from commit 8f2f43f093)
- client->msg_idx can be > MQTT_VAR_HEADER_BUFFER_LEN in long message splitted in multiple pbufs
- renamed fixed_hdr_idx to fixed_hdr_len because it is length of fixed header in rx_buffer, not an index to it
- removed the cpy_start as data always copied right after the fixed header
(cherry picked from commit 2cc420e434)
by replacing strnlen with strlen. It's a user-supplied string, so we can assume it is correctly \0 terminated (as done several times elsewhere in the code)
(cherry picked from commit aa83bdf490)
This reverts commit ebb0dc14a7.
It changes the behaviour to assert for applications running good so far.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
Fixes: ebb0dc14a7 ("tcp_recved: check for overflow and warn about too big values")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Goldschmidt <goldsimon@gmx.de>