summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-05-06sockets: Get rid of sock_set_errnoHEADmasterAxel Lin
The err field is removed from struct lwip_sock since commit e0a2472706ee ("netconn/sockets: remove fatal error handling, fix asynchronous error handling, ensure data before RST can be received") sock_set_errno() simply calls set_errno() now, so use set_errno() instead. Signed-off-by: Axel Lin <[email protected]> Acked-by: Dirk Ziegelmeier <[email protected]>
2019-05-06Fix bug #56136: The netif->mtu6 was updated by Router Advertisement abnomallyDirk Ziegelmeier
Using patch from Gao Quingahui plus improvement
2019-04-30mdns mdns_search_service mdns_search_stop: define the request id as unsigned.Our Air Quality
2019-04-30Apply patch for bug #56098: Support for MQTT over TLS port 443 instead of 8883Dirk Ziegelmeier
2019-04-30Apply patch for bug #56239: compile fail when disable TCPDirk Ziegelmeier
2019-04-30Minor compile fix for last commitDirk Ziegelmeier
2019-04-30mqtt: fix first packet checking which fail if MQTT_VAR_HEADER_BUFFER_LEN > 1516David Girault
If client reception buffer is bigger than the first frame we receive, the first packet test will always fail for the second one if it is shorter the the diffence between reception buffer size and first frame length. For example, if we receive a PUBLISH message with length = 1517 (payload len = 1514 + header len = 3), this result in total message length of 1517. altcp_tls will send MQTT client frame up to 1516 bytes max. This result to PUBLISH message splitted in two frame: first is 1516 bytes, the second of 1 bytes. If MQTT_VAR_HEADER_BUFFER_LEN is 1520 (1516 + 4 bytes for stored fixed header), the second frame of 1 bytes is considered as first publish frame because client->msg_idx (1517) < MQTT_VAR_HEADER_BUFFER_LEN (1520). This result in disconnection AND application callback never called for the end of the payload. The fix will check `(client->msg_idx - (fixed_hdr_len + length)) == 0` which can be only true for the first frame of a message. Below logs showing the bug: ``` April 3rd 2019, 23:14:05.459 lwip_dbg mqtt_parse_incoming: Remaining length after fixed header: 1514 April 3rd 2019, 23:14:05.460 lwip_dbg mqtt_parse_incoming: msg_idx: 1516, cpy_len: 1513, remaining 1 April 3rd 2019, 23:14:05.460 lwip_dbg mqtt_incomming_publish: Received message with QoS 1 at topic: v2/inte... April 3rd 2019, 23:14:05.461 lwip_dbg mqtt_parse_incoming: Remaining length after fixed header: 1514 April 3rd 2019, 23:14:05.461 lwip_dbg mqtt_parse_incoming: msg_idx: 1517, cpy_len: 1, remaining 0 April 3rd 2019, 23:14:05.461 lwip_dbg mqtt_message_received: Received short PUBLISH packet ```
2019-04-30mqtt: support mostly zero-copy message analysisDavid Girault
also ensure no parts of message are lost because cpy_len != buffer_space!
2019-04-30mdns_resp_add_service: simplify the max services guard.Our Air Quality
2019-04-30mDNS: output search queries to the IP v4 and v6 groups.Our Air Quality
These had been broadcasting to the *_ANY addresses.
2019-04-30ND6: add an explicit queue size check.Our Air Quality
When using the MEMP_MEM_MALLOC option, memp_malloc() can not be relied on to limit the number of allocations allowed for each MEMP queue, as the ND6 code had been. This caused the ND6 queue to keep growing until the heap allocation failed when using the MEMP_MEM_MALLOC option. So add an explicit queue size check in ND6.
2019-04-30mdns: defined the service slot id as unsigned rather than signed.Our Air Quality
2019-04-30mdns_search_service: simply the search for a free slot.Our Air Quality
2019-04-30mDNS: change some debug line terminations to just newlines.Our Air Quality
Some of there were using carriage-return and newline, yet the rest of the code base consistently uses only newline.
2019-03-28Fix and simplify newlines in doxygen documentationFreddie Chopin
Replace '\n' with '<br>', as this allows doxygen to understand reference names followed by newline. For some cases just drop the newline if it's not required. Doxygen 1.8.15 doesn't like if the name of reference is followed by anything else than (selected?) punctuation or whitespace. bug #56004
2019-03-28Fix doxygen @ref in altcp.cFreddie Chopin
Doxygen 1.8.15 doesn't like if the name of reference is followed by anything else than (selected?) punctuation or whitespace. bug #56004
2019-03-28Add #define for minimum IPv6 MTU lengthDirk Ziegelmeier
2019-03-24Fix bug #55702: SSI bugDirk Ziegelmeier
Apply patch from Stanislav
2019-03-24Fix compile of last patchDirk Ziegelmeier
2019-03-24Fix bug #55972: The Neighbour Solicitation used to do IPv6 address ↵Dirk Ziegelmeier
resolution was wrong Apply patch from Gao Qingshui
2019-03-24Fix bug #55973: The parsing of max response time in MLD Query message was wrongDirk Ziegelmeier
Apply patch from Gao Qingshui
2019-03-20Add note about MEMP_NUM_SYS_TIMEOUT in four appsDirk Ziegelmeier
2019-02-27udp_bind: fix missing parenthesis warningSimon Goldschmidt
Signed-off-by: Simon Goldschmidt <[email protected]>
2019-02-26udp: fix udp_bind for IPADDR_TYPE_ANYSimon Goldschmidt
See bug #55171 Signed-off-by: Simon Goldschmidt <[email protected]>
2019-02-08Fix LWIP_ERROR macro - it should never be fatal (LWIP_ASSERT)Dirk Ziegelmeier
The only difference should be: - LWIP_DEBUG enabled -> print a diag message - LWIP_DEBUG disabled -> NO diag message is printed
2019-02-02Fix a few documentation errors in MDNSDirk Ziegelmeier
2019-01-30tcp: don't reset dupack count upon non-empty packet receiveSolganik Alexander
According to rfc5681: https://tools.ietf.org/html/rfc5681 Paragraph 3.2. Fast Retransmit/Fast Recovery The TCP sender SHOULD use the "fast retransmit" algorithm to detect and repair loss, based on incoming duplicate ACKs. The fast retransmit algorithm uses the arrival of 3 duplicate ACKs (as defined in section 2, without any intervening ACKs which move SND.UNA) as an indication that a segment has been lost. After receiving 3 duplicate ACKs, TCP performs a retransmission of what appears to be the missing segment, without waiting for the retransmission timer to expire. Now consider the following scenario: Server sends packets to client P0, P1, P2 .. PK. Client sends packets to server P`0 P`1 ... P`k. I.e. it is a pipelined conversation. Now lets assume that P1 is lost, Client will send an empty "duplicate" ack upon receive of P2, P3... In addition client will also send a new packet with "Client Data", P`0 P`1 .. e.t.c. according to sever receive window and client congestion window. Current implementation resets "duplicate" ack count upon receive of packets from client that holds new data. This in turn prevents server from fast recovery upon 3-duplicate acks receive. This is not required as in this case "sender unacknowledged window" is not moving. Signed-off-by: Solganik Alexander <[email protected]>
2019-01-30sntp: obey KoD when using multiple serversSimon Goldschmidt
See bug #55253 (SNTP retry next server instantly result as a flood of NTP request). Added 'sntp_getkodreceived()' to check the status.
2019-01-30mdns: fix compiler errors and coding styleSimon Goldschmidt
2019-01-30mdns: added support for searching servicesDavid Girault
Two new API: err_t mdns_search_service(const char *name, const char *service, enum mdns_sd_proto proto, struct netif *netif, search_result_fn_t result_fn, void *arg, s8_t *request_id); void mdns_search_stop(s8_t request_id); One compilation flags: LWIP_MDNS_SEARCH One options flags: MDNS_MAX_REQUESTS Some structure declarations moved to allow use by callback result function. Result domain names are early uncompress before calling application callback because it cannot be made by application itself. Allow search services with multiples labels included, like '_services._dns-sd'. Search for `_services._dns-sd._udp.local.` is handled in a special way. Only `PTR` answers are send back to the application. The `mdns_search_service()` function won't assert if no more space in `mdns_request` table, just return an error if too many simultanous requests.
2019-01-30Small documentation fix for TFTPIvan Warren
Apparently the TFTP server now also invokes the error() function in the tftp_context struct. Some tftp clients (for example Windows 10 TFTP client) will open the remote file before checking the local file can be opened - and will then send an error indication to the server to indicate there was an error opening the local file. When the happens, the LWIP tftp server will invoke the error() member of the tftp_context.
2019-01-30Implement RFC4075 Receive SNTP servers via DHCPv6David J. Fiddes
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 <[email protected]>
2019-01-30altcp_tls: assert in altcp_mbedtls_bio_recv if bad stateDavid Girault
2019-01-30altcp: support for setting keepalive parametersDavid Girault
2019-01-30altcp_tls_mbedtls: remove entropy/ctr_drbg from altcp_tls_config structDavid Girault
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)
2019-01-30mqtt: remove bad assert in mqtt_message_received()David Girault
- 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
2019-01-30tcp: improve debug message a littleSimon Goldschmidt
2019-01-28Fix bug #55537: Crash in SYN_SENT state when TCP_INPUT_DEBUG logs are ONDirk Ziegelmeier
2019-01-28Apply patch #9737: Fix DHCPv6 DNS server assignmentDirk Ziegelmeier
2019-01-28Fix bug #55536: lwIP 2.1.2: netconn_delete() called twice from lwip_accept()Dirk Ziegelmeier
netconn is deleted in free_socket() call
2019-01-28TCP/UDP documentation: Add reference to PCB mempool #definesDirk Ziegelmeier
2019-01-18Fix bug #55513: Uninitialized variable in struct netconnDirk Ziegelmeier
using patch from Karol Domagalski
2019-01-06Replace several occurences of stdint types by lwIPs portability typedefsDirk Ziegelmeier
Fixes bug #55405: Usage of uint8_t instead of ui8_t in TCP code
2019-01-04dhcp.c: Fix typo in debug messageDirk Ziegelmeier
2018-12-20PPP, PPPoE: use service name and concentrator nameJacob Kroon
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 <[email protected]>
2018-12-18PPP, PPPoE: remove leftover from PPPOE_SCNAME_SUPPORT supportSylvain Rochet
Stupid me managed to push a pending patch, remove it. Signed-off-by: Sylvain Rochet <[email protected]>
2018-12-18PPP, PPPoE: fix build when PPPOE_SCNAME_SUPPORT is definedJacob Kroon
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 <[email protected]>
2018-12-18PPP, PPPoE: rename PPPOE_TODO to PPPOE_SCNAME_SUPPORT, prepare service name ↵Sylvain Rochet
and concentrator support 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 <[email protected]>
2018-12-06Fix bug #55171: Binding UDP PCB with different IP type PCBs does not workDirk Ziegelmeier
by additionally checking IP address type
2018-12-05DEF: added lwip_strnistr() for case insensitive matchingJasper Verschueren