Commit Graph

952 Commits

Author SHA1 Message Date
Joel Cunningham
445eef2b0e sockets: add readv() implementation (task #14610)
Adds an implementation of readv() that calls recvmsg()

See http://pubs.opengroup.org/onlinepubs/009695399/functions/readv.html
2017-09-11 14:48:33 -05:00
goldsimon
558480a5b9 add bug #51937 to CHANGELOG 2017-09-11 21:37:28 +02:00
Joel Cunningham
f582c88339 tcp: persist timer re-work (bug #50837)
This re-works the persist timer to have the following behavior:

  1) Only start persist timer when a buffered segment doesn't fit within
     the current window and there is no in-fligh data.  Previously, the
     persist timer was always started when the window went to zero even
     if there was no buffered data (since timer was managed in receive
     pathway rather than transmit pathway)
  2) Upon first fire of persist timer, fill the remaining window if
     non-zero by splitting the unsent segment.  If split segment is sent,
     persist timer is stopped, RTO timer is now ensuring reliable window
     updates
  3) If window is already zero when persist timer fires, send 1 byte probe
  4) Persist timer and zero window probe should only be active when the
     following are true:
       * no in-flight data (pcb->unacked == NULL)
       * when there is buffered data (pcb->unsent != NULL)
       * when pcb->unsent->len > pcb->snd_wnd
2017-08-25 09:35:10 -05:00
Joel Cunningham
9844049cb1 lwip_itoa: fix converting 0 (bug #51729)
lwip_itoa would output the number 0 as \0.  This fixes the issue by
adding a special check before the normal conversion loop

This was found via shell cmd idxtoname and win32 port.  "lo0" should
be returned for index 1
2017-08-11 13:38:51 -05:00
Dirk Ziegelmeier
47a4be83e4 CHANGELOG/UPGRADING: Also mention that LWIP_HOOK_IP4_ROUTE_SRC has changed, too 2017-08-08 13:13:46 +02:00
Dirk Ziegelmeier
60dd518887 Implement task #14594: Improve consistency of ip route API parameters
reverse parameters of ip4_route_src to be consistent with other ip*_route* functions
This commit will break applications using this function!
2017-08-08 12:41:19 +02:00
goldsimon
cd80e38db8 Clean up DHCP a bit: no need keep msg_out and msg_in as members in struct dhcp
They are used in a call stack only (p_out and options_out_len as well)
2017-08-04 21:26:29 +02:00
goldsimon
7b41aba126 Add the last commit to CHANGELOG 2017-08-04 21:23:12 +02:00
goldsimon
4c13c32473 fix bug #51578 (SNMP failed to decode some values on non 32bit platforms) 2017-07-26 08:41:13 +02:00
goldsimon
afee9013ad added passages about moved posix headers and changed SO_ERROR to CHANGELOG/UPGRADING 2017-07-24 21:15:45 +02:00
Our Air Quality
f934ca7a03 [PATCH] Deprecate sys_arch_sem_wait and sys_arch_mbox_fetch returning the time waited
These are now defined to return != SYS_ARCH_TIMEOUT on success rather than the time
waiting. The returned times were unused by lwip and this simplifies at
least some implementations.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-07-20 22:04:34 +02:00
goldsimon
b1a90ad74a Added TCP SACKs to CHANGELOG 2017-07-04 20:09:15 +02:00
Joel Cunningham
d4c8a1ac78 netconn: switch gethostbyname to use tcpip_send_msg_wait_sem (task #14523)
This switches netconn_gethostbyname to use tcpip_send_msg_wait_sem to
take advantage of core locking support when enabled.

tcpip_send_msg_wait_sem handles blocking for the non-core locking case,
so we can remove the manual blocking in netconn_gethostbyname. For the
core locking case, we need to block if waiting on DNS callback. To
achieve this, we unlock the core and wait in lwip_netconn_do_gethostbyname.
This is the similar approach that netconn_write takes when it needs to
block to continue the write (see lwip_netconn_do_write)

This improves performance in the core locking case and is no change
for the non-core locking case
2017-06-20 17:52:28 -05:00
Joel Cunningham
c03fef9a3c bug #50837: add zero-window probe timeout
This commit adds a timeout to the zero-window probing (persist timer)
mechanism. LwIP has not historically had a timeout for the persist
timer, leading to unbounded blocking if connection drops during the
zero-window condition

This commit also adds two units test, one to check the RTO timeout
and a second to check the zero-window probe timeout
2017-05-09 09:01:03 -05:00
Joel Cunningham
0b6e2d9c15 Update changelog for features/bugs since 2.0.1 2017-04-25 17:40:11 -05:00
goldsimon
836c0cf42e added dhcp hooks to CHANGELOG 2017-04-25 20:20:13 +02:00
goldsimon
e0a2472706 netconn/sockets: remove fatal error handling, fix asynchronous error handling, ensure data before RST can be received 2017-04-12 12:37:16 +02:00
goldsimon
92997756d1 task #14420 (Remove sys_sem_signal from inside SYS_ARCH_PROTECT crit section) done for LWIP_TCPIP_CORE_LOCKING==1 2017-04-11 12:40:44 +02:00
goldsimon
5c3bb19923 added nonblocking accept/recv to netconn API (task #14396) (also added netconn_recv_udp_raw_netbuf_flags() and netconn_recv_tcp_pbuf_flags() to pass socket-like flags to nonblock for one call only) 2017-03-02 20:38:11 +01:00
goldsimon
05a595f745 httpd: LWIP_HTTPD_POST_MANUAL_WND: fixed double-free when httpd_post_data_recved is called nested from httpd_post_receive_data() (bug #50424) 2017-03-01 22:08:05 +01:00
goldsimon
0d585d55d3 Added LWIP_SINGLE_NETIF for small targets with only one netif (see task #13515, there might be more optimizations to come with this option) 2017-03-01 16:10:50 +01:00
goldsimon
f85eed0ab3 tcp: fixed bug #50418: LWIP_EVENT_API: fix invalid calbacks for SYN_RCVD pcb 2017-02-28 12:13:26 +01:00
goldsimon
a38e937dd6 fixed close race conditions in lwip_select (for LWIP_NETCONN_FULLDUPLEX) 2017-02-24 21:29:29 +01:00
goldsimon
3107d4a0fa fixed that select ignored invalid/not open sockets in the fd_sets (bug #50392) 2017-02-24 19:48:59 +01:00
goldsimon
deaa6e9406 Improved DNS_LOCAL_HOSTLIST interface (bug #50325) 2017-02-17 10:08:49 +01:00
sg
6dca664217 LWIP_NETCONN_FULLDUPLEX: fixed shutdown during write (bug #50274) 2017-02-16 22:09:02 +01:00
Dirk Ziegelmeier
def87c0c23 Add David's IPv6 multicast work to CHANGELOG 2017-02-10 22:42:14 +01:00
goldsimon
bc07fd9db5 Fixed bug #47485 (tcp_close() should not fail on memory error) by retrying to send FIN from tcp_fasttmr 2017-02-10 09:42:38 +01:00
Dirk Ziegelmeier
1fd56658b8 Add IPv6 scopes to CHANGELOG 2017-02-04 18:44:30 +01:00
Dirk Ziegelmeier
c362c6a02c Add note about bug #50064 to CHANGELOG 2017-01-18 12:33:26 +01:00
Dirk Ziegelmeier
a038e1502f Add David's IPv6 improvements to CHANGELOG 2017-01-11 08:42:40 +01:00
Dirk Ziegelmeier
3cc7b319d9 Add MQTT to CHANGELOG (too late for 2.0.1 release...) 2017-01-08 19:45:28 +01:00
Dirk Ziegelmeier
e3435401f1 Add David's changes from patch #9208 to CHANGELOG 2017-01-08 19:29:46 +01:00
sg
98fc82fa71 added function tcp_listen_with_backlog_and_err() to get the error reason when listening fails (bug #49861) 2016-12-31 15:36:31 +01:00
Thomas Mueller
fcd2daf57c fixed race condition in return value of netconn_gethostbyname() (and thus also lwip_gethostbyname/_r() and lwip_getaddrinfo())
Signed-off-by: sg <goldsimon@gmx.de>
2016-12-16 15:44:00 +01:00
sg
62e340067e LWIP_HOOK_TCP_ISN: added CHANGELOG/fixed comment 2016-12-15 21:08:12 +01:00
sg
6b1950ec24 nd6: add support for RDNSS option (as per RFC 6106) 2016-12-14 22:12:14 +01:00
goldsimon
1a53c106e1 CHANGELOG: added LWIP_HOOK_ND6_GET_GW() 2016-12-14 08:42:11 +01:00
goldsimon
74a5537e15 Revert "Added LWIP_HOOK_ETHIP6_GET_GW()"
This reverts commit 86b01e4f29.
2016-12-14 08:36:47 +01:00
Pradip De
86b01e4f29 Added LWIP_HOOK_ETHIP6_GET_GW()
Signed-off-by: sg <goldsimon@gmx.de>
2016-12-13 21:53:07 +01:00
Dirk Ziegelmeier
1c184da615 Update changelog for LWIP_NETIF_TX_SINGLE_PBUF 2016-12-13 18:48:26 +01:00
goldsimon
5774fdfe75 dns: added one-shot multicast DNS queries 2016-12-09 09:20:46 +01:00
Dirk Ziegelmeier
cb29a49a64 Update CHANGELOG 2016-12-06 11:39:03 +01:00
goldsimon
ca9342c549 fixed bug #49725 (send-timeout: netwonn_write() can return ERR_OK without all bytes being written) 2016-11-28 12:51:45 +01:00
goldsimon
6f1304e03e patch by Ambroz Bizjak: fixed bug #49717 (window size in received SYN and SYN-ACK assumed scaled) 2016-11-28 10:27:21 +01:00
goldsimon
0e07ed4b13 fixed bug #49676 (Possible endless loop when parsing dhcp options) & added unit test for that 2016-11-25 10:03:43 +01:00
goldsimon
f419231dc3 fixed typo in CHANGELOG 2016-11-24 11:31:46 +01:00
Ambroz Bizjak
8ba7363d11 Optimize passing contiguous nocopy buffers to tcp_write
While TCP_OVERSIZE works only when tcp_write() is used with
TCP_WRITE_FLAG_COPY, this new code achieves
similar benefits for the use case that the caller manages their own
send buffers and passes successive chunks of those to tcp_write()
without TCP_WRITE_FLAG_COPY.

In particular, if a buffer is passed to
tcp_write() that is adjacent in memory to the previously passed
buffer, it will be combined into the previous ROM pbuf reference
whenever possible, thus extending that ROM pbuf rather than allocating
a new ROM pbuf.

For the aforementioned use case, the advantages of this code are
twofold:
1) fewer ROM pbufs need to be allocated to send the same data, and,
2) the MAC layer gets outgoing TCP packets with shorter pbuf chains.

Original patch by Ambroz Bizjak <ambrop7@gmail.com>
Edited by David van Moolenbroek <david@minix3.org>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-11-24 11:27:34 +01:00
goldsimon
4c8620e03b Added important post-2.0.0 changes to CHANGELOG to keep track of changes for future 2.0.1 release 2016-11-24 11:21:00 +01:00
goldsimon
eb1de78ce1 prepare CHANGELOG for post-2.0.0 2016-11-24 11:12:22 +01:00