Like pbuf_copy, but can copy part of a pbuf to an offset in another.
pbuf_copy now uses this function internally.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
Use 'PBUF_IP_HLEN+PBUF_TRANSPORT_HLEN' instead of '40' to calculate
PBUF_POOL_BUFSIZE (the size of each PBUF_POOL buffer) since the former
can be 60 when IPv6 is enabled.
See bug #56355
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
Make pppoe_create() actually store the passed service name and
concentrator name, so that they are passed in the PADI/PADR/PADS
packets.
Assume that the user application won't be freeing the strings and just
copy the string pointers, therefore remove the mem_free() in
pppoe_destroy().
Since only the pointers are copied now, make them 'const' in
pppoe_softc.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
(cherry picked from commit c02fea0961)
lwip/src/netif/ppp/pppoe.c:768:24: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=poin$
l1 = (int)strlen(sc->sc_service_name);
lwip/src/netif/ppp/pppoe.c:772:24: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=poin$
l2 = (int)strlen(sc->sc_concentrator_name);
sc->sc_service_name and sc->sc_concentrator_name are best defined as
char* because there are passed to libc strings functions which expect
a char*.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
(cherry picked from commit 7eab5947af)
Rename PPPOE_TODO to PPPOE_SCNAME_SUPPORT because this is the only
feature enclosed by them. Prepare for proper service name and
concentrator name support by moving PPPOE_SCNAME_SUPPORT define to
ppp_opts.h.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
(cherry picked from commit 96548ede2b)
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 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)
TLS clients that need 2-way authentication (e.g. Amazon AWS IoT cloud mqtt)
need to pass a certificate and private key when creating the tls altcp_pcb.
Added a new function altcp_tls_create_config_client_2wayauth() for this that
replaces altcp_tls_create_config_client() for such clients.
See bug #54601.
e.g. if the calling stack should not invoke the mdns functions due
to high stack usage, disable the option and trigger it yourself.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>