See bug #54655:
"MQTT brokers such as Google Cloud IoT Core requires MQTT clients
to send JSON Web Token (JWT) as password field of the MQTT Connect
packet. JWT can be more than 255 bytes.
Currently, the MQTT library restricts password to be less than 256
bytes, thus it prevents connectivity to Google Cloud IoT Core."
Fix that by just converting the local variables for these from u8_t
to u16_t.
Suggested-by: Richmond Umagat <richmond.umagat@brtchip.com>
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
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.
not needed any more since commit b0344518e8
"sockets.c: Don't rely on #defines in socket.h to be in sync with ip.h
Map SO_* to SOF_* #defines"
Reported by Joan Lledó on mailinglist 6.Sep.2018
magic_init() is first time called from ppp_init(), which is called from
lwip_init(). If system has no RTC, sys_jiffies() returns same value in
this moment after every power-up or system reset. This value used in LCP
magic number generation after ppp_connect(), which leads to same magic
number after every restart. Subsequent magic_randomize() calls takes
place in ppp_input(), after magic number generation.
Call magic_randomize() somewhere near start of ppp_connect() (and
ppp_listen()) as it might be called later at a random time.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
When the network is changed, dhcp is rebooted.
It will send a dhcp request again to verify it's lease.
DHCP requests are send out in selecting state, rebinding, renewing
and rebooting. But in the rebooting state the hostname option is
not included. This means that after reboot, the hostname will be
unknown to the DNS.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This fixes an issue seen on MacOS with Clang 9.0.0:
../../../../lwip/src/core/ipv4/etharp.c:1069:142: error: format specifies type 'unsigned short' but the argument has type 'netif_addr_idx_t'
(aka 'unsigned char') [-Werror,-Wformat]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"U16_F"\n", (void *)q, i));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../../../lwip/src/core/ipv4/etharp.c:1074:120: error: format specifies type 'unsigned short' but the argument has type 'netif_addr_idx_t'
(aka 'unsigned char') [-Werror,-Wformat]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"U16_F"\n", (void *)q, i));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
By default, netif_addr_idx_t is u8_t, so cast up to u16_t to match the format type
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>