4866 Commits

Author SHA1 Message Date
Dirk Ziegelmeier
1cf9fc0d39 Update doxygen version to 2.0.3 as in init.h
(cherry picked from commit 59fba75cd8f94343d2ac5cafe6a79578fde7b994)
2017-09-14 09:16:18 +02:00
goldsimon
f9872c519c memp.h: added missing include
(cherry picked from commit 3fd8440ab91af09b83cc72fcbf1a8d9441f72b8c)
2017-09-14 09:15:54 +02:00
Dirk Ziegelmeier
a4017a485c Fix coding style NO_SYS example code
(cherry picked from commit b9a40a5163b78cf186169fc878f5a655fee20261)
2017-09-14 09:07:44 +02:00
Dirk Ziegelmeier
2490d034cd Fix starting DHCP in NO_SYS example code
(cherry picked from commit da0714d7cb8f8b617bd241ea37ccab23ac82c951)
2017-09-14 09:07:43 +02:00
goldsimon
282e85763b lwip_init(): at least IAR warns about "LWIP_UNUSED_ARG(a)" accessing an uninitialized variable... Try to fix this by initializing it (it will be optimized away anyway)
(cherry picked from commit 946b2315163de66952d48b308551b94b2b1043b4)
2017-09-14 09:06:34 +02:00
goldsimon
c0862d6074 Fixed LWIP_VERSION define for 2.0.2 STABLE-2_0_2_RELEASE_VER 2017-03-13 13:27:00 +01:00
goldsimon
ea2f6fb57c Add CHANGELOG for 2.0.2 STABLE-2_0_2_RELEASE 2017-03-13 10:26:42 +01:00
Dirk Ziegelmeier
b307fea1b9 Rename "IPv6 mapped IPv4 addresses" to their correct name from RFC4191: "IPv4-mapped IPv6 address"
(cherry picked from commit 4d8fec3b67b104f3f082aa4371251b6ae3d33a35)

Conflicts:
	src/core/ipv6/ip6.c
2017-03-13 09:28:46 +01:00
Joel Cunningham
c31bd404e2 Fix unit test with assumed congestion avoidance
test_tcp_fast_rexmit_wraparound correctness relied on the congestion
window being in congestion avoidance so that only a single TCP_MSS
segment is sent upon ACKing the first segment.

It's not known whether the test was relying tcp_alloc() to set ssthresh
to 0 and thus start in congestion avoidance or if the test was working by
accident until changes in b90a54f989d0edafa36b29bb0c346d1b30e1bf8f

This fixes the test by enforcing the requirement of starting in
congestion avoidance

Signed-off-by: goldsimon <goldsimon@gmx.de>
(cherry picked from commit 8bf402fd678def9396d7f951531e75a239de8a12)
2017-03-13 09:14:38 +01:00
goldsimon
0381849624 tcp unit tests: fixed that tcp_teardown() could lead to accessing a netif pointer that is not valid any more (netif added in test function stored on stack)
(cherry picked from commit e9e9ec23b86fa3fcf3df6428bfa2c3e167a053e8)
2017-03-13 09:14:24 +01:00
goldsimon
19d56b4096 tcp: watch out for pcb->nrtx overflows and tcp_backoff indexing overflow
(cherry picked from commit 7ffe5bfb3c4bb21a09046e254a2b6a12e3450ada)
2017-03-13 09:14:23 +01:00
David van Moolenbroek
66db517a28 tcp: do not keep sending SYNs when getting ACKs
If a locally generated TCP SYN packet is replied to with an ACK
packet, lwIP immediately sends a RST packet followed by resending the
SYN packet.  This is expected, but on loopback interfaces the resent
SYN packet may immediately get another ACK reply, typically when the
other endpoint is in TIME_WAIT state (which ignores the RSTs).  The
result is an endless loop of SYN, ACK, RST packets.

This patch applies the normal SYN retransmission limit in this
scenario, such that the endless loop is limited to a brief storm.

(cherry picked from commit 5827c168c28b43d98ffbf91f45c38a054e848eda)
2017-03-13 09:14:22 +01:00
Joel Cunningham
2452bc9336 bug #50476: initialize ssthresh to TCP_SND_BUF
This commit changes ssthresh to be the largest effective congestion
window (amount of in-flight data). This follows the guidance of RFC
5681 which recommends setting ssthresh arbitrarily high.

LwIP was previously using the receive window value at the end of the
3-way handshake and in the case of an active open where the receiver
used window scaling and/or window auto-tuning, this resulted in a very
small ssthresh value even though the window ramped up once the connection
was established

(cherry picked from commit b90a54f989d0edafa36b29bb0c346d1b30e1bf8f)
2017-03-13 09:13:41 +01:00
Sylvain Rochet
2848b17e80 PPP: remove unused and confusing return values other than ERR_OK for ppp_connect and ppp_listen
User should not use ppp_connect or ppp_listen return value to retry
later, it must wait for the callback to be called. This is primarily
done this way to have a consistent behavior with and without the
holdoff feature.

Remove returned error value from PPP link level API connect and listen
callbacks because we are not using them anymore, then make ppp_connect
or ppp_listen to always return ERR_OK, thus we are not breaking the PPP
user API.

We don't need the return code here, all PPP link level drivers can't
fail at all (e.g. PPPoS) or retry if necessary (PPPoE and PPPoL2TP).

(cherry picked from commit e16d10ade6204a2f896eb872fb5075bec8e5164f)
2017-03-13 09:13:17 +01:00
goldsimon
c71c9882c2 arch.h: include <limits.h> if it exists (at least INT_MAX is used)
(cherry picked from commit aff1935e409df720e004e6c83d81d50fbc4465d8)
2017-03-13 09:13:07 +01:00
Dirk Ziegelmeier
40fbd6bc24 One enum icmp_te_type member is not in doxygen docs - fix it.
(cherry picked from commit 927990d94ea58c651e24492563de6f97548d5856)
2017-03-13 09:12:30 +01:00
goldsimon
df7485de1c lwip_sendmsg/tcp: prevent PSH until all iovecs are enqueued
(cherry picked from commit 1b3aaef52512219ced9e769a81667f036a6c00a1)
2017-03-13 09:12:08 +01:00
goldsimon
fe6e1bd4af httpd: LWIP_HTTPD_POST_MANUAL_WND: fixed double-free when httpd_post_data_recved is called nested from httpd_post_receive_data() (bug #50424)
# Conflicts:
#	CHANGELOG
2017-03-01 22:15:59 +01:00
goldsimon
168fa1c38a Fix compiling httpd for LWIP_HTTPD_SUPPORT_POST==1 (assigning int to u16_t) 2017-03-01 22:15:42 +01:00
goldsimon
f0975b3c59 make tcp apps depend on LWIP_CALLBACK_API, too 2017-03-01 22:15:18 +01:00
goldsimon
563932b888 tcp: fixed bug #50418: LWIP_EVENT_API: fix invalid calbacks for SYN_RCVD pcb
# Conflicts:
#	CHANGELOG
2017-03-01 22:15:07 +01:00
goldsimon
8849a443a4 pbuf_ref: assert-check for 'ref' overflow
(cherry picked from commit 76763c9bcd778bf67dc959e2992769c07ed0bdbe)
2017-02-27 12:31:13 +01:00
goldsimon
e318688195 Improved DNS_LOCAL_HOSTLIST interface (bug #50325)
(cherry picked from commit deaa6e94065f41dbdd6c7aec535b5247c0478d74)

Conflicts:
	CHANGELOG
2017-02-27 12:30:38 +01:00
goldsimon
fa8b6a92b4 Fix portable initialization of non-dynamic DNS_LOCAL_HOSTLIST
(cherry picked from commit 19d63e6aa07d17897a156dee1fc33a5b75f39234)
2017-02-27 12:30:30 +01:00
sg
2ca39c275a LWIP_NETCONN_FULLDUPLEX: fixed shutdown during write (bug #50274)
(cherry picked from commit 6dca6642174df81dc6813c7f0cdc8f2cd5be497f)

Conflicts:
	CHANGELOG
2017-02-27 12:29:23 +01:00
Joel Cunningham
4d1d567ab7 Fix comment typo from bug #47485
tcp_close_shutdown_impl() should be tcp_close_shutdown_fin()

(cherry picked from commit 0b257f71e7963a640d4c470f89cc3b9f72460c3f)
2017-02-27 12:28:18 +01:00
goldsimon
8927cda2f8 For tiny targtes, LWIP_RAND is optional -> fix compile time checks
(cherry picked from commit 693a74c286c3712a5a8e5ed99f6f6b82ed43a080)
2017-02-27 12:27:47 +01:00
Dirk Ziegelmeier
bc78251f4a My documentation changes forced the usage of rand() function, which is not desired
By default, the code that does NOT need LWIP_RAND() is active now

(cherry picked from commit 06c84cb1103e5c6a6d1630b1d26025a817013a10)
2017-02-27 12:27:30 +01:00
David van Moolenbroek
0a3e4cd10e tcp: fix accept event on closed listening PCBs
If LWIP_CALLBACK_API is not defined, but TCP_LISTEN_BACKLOG is, then
the LWIP_EVENT_ACCEPT TCP event may be triggered for closed listening
sockets.  This case is just as disastrous for the event API as it is
for the callback API, as there is no way for the event hook to tell
whether the listening PCB is still around.  Add the same protection
against this case for TCP_LISTEN_BACKLOG as was already in place for
LWIP_CALLBACK_API.

Also remove one NULL check for LWIP_CALLBACK_API that had already
become redundant for all callers, making the TCP_EVENT_ACCEPT code
for that callback wrapper more in line with the rest of the wrappers.

(cherry picked from commit 240cf62056358caa53d9e83067a4fa0407974b8c)
2017-02-27 12:25:52 +01:00
Dirk Ziegelmeier
76efa271e6 Implement task #14367: Hooks need a better place to be defined
We now have a #define for a header file name that is #included in every .c file that provides hooks.
2017-02-27 12:25:08 +01:00
goldsimon
b3293d903e Fixed bug #47485 (tcp_close() should not fail on memory error) by retrying to send FIN from tcp_fasttmr
(cherry picked from commit bc07fd9db5c276a6ae70638ecf1ce956c9dfdc15)

Conflicts:
	CHANGELOG
2017-02-27 12:24:51 +01:00
Dirk Ziegelmeier
5ef8a3cb60 igmp.c: igmp_lookup_group() should be static
(cherry picked from commit 702091d548ca75aaea7e3e9f4433c6505260302b)
2017-02-27 12:23:39 +01:00
sg
01c2e43c5c Fixed bug #44032 (LWIP_NETCONN_FULLDUPLEX: select might work on invalid/reused socket) by not allowing to reallocate a socket that has "select_waiting != 0"
(cherry picked from commit c1c470fc4c0f3ed7f66358688d49fb33cfb603f7)
2017-02-27 12:23:04 +01:00
goldsimon
0b7bef5420 http_add_connection: add connections to the front to be faster (and really fix bug #50059)
(cherry picked from commit ea093d3a5349f77970629f51025ebe84a33e0955)
2017-02-27 12:22:42 +01:00
goldsimon
3c4aec99a4 Fixed bug #50059 (httpd LWIP_HTTPD_SUPPORT_11_KEEPALIVE vs. LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED)
(cherry picked from commit 57438647442f71d47fe4986dd30bbc073b48e469)
2017-02-27 12:22:42 +01:00
Luc Revardel
dc38e21a70 Fix bug #50220 (mld6_leavegroup does not send ICMP6_TYPE_MLD, even if last reporter)
Signed-off-by: sg <goldsimon@gmx.de>
(cherry picked from commit 819bfbb943e2d4adeef147432be808f5c9356196)
2017-02-27 12:22:41 +01:00
David van Moolenbroek
d471e5f89e Patch #9250 (slightly changed): fix source substitution in ip6_output_if() (broken in 2014 with be75c483d0adae9ce786e3e2d5760f8e37005ac7)
Signed-off-by: sg <goldsimon@gmx.de>
(cherry picked from commit fffd61c746c9f98be3379d7488ab8f142e4f9878)
2017-02-27 12:22:03 +01:00
sg
99ef13f2be Fixed bug #50090 (ast_unsent->oversize_left can become wrong value in tcp_write error path)
(cherry picked from commit 21737f57e53c9207f4f31da768aebdd160f6cdad)
2017-02-27 12:21:31 +01:00
Dirk Ziegelmeier
bb2b2be454 Fix bug #50206: UDP Netconn bind to IP6_ADDR_ANY fails
The tests were in to catch user errors, but they seem to get in the way of application programming :-)
The checks in *_send() remain active to catch when PCB source and destination address types do not match

(cherry picked from commit ff04c2046e6d3e6240613d187b96cae134a81fe2)
2017-02-27 12:20:01 +01:00
goldsimon
faa7a21a83 Fix comment on lwip_shutdown() (it's not unimplemented any more)
(cherry picked from commit 4b091cfc2af1dde6018aa452ab025b87a69855db)
2017-02-27 12:19:28 +01:00
Axel Lin
d6e8e05edd stats: Remove superfluous /t in end of stats display
The debug message after the stats display looks odd because the /t in end of
stats display.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
(cherry picked from commit 2685d742e80683aa7817df3f99973342703ee05f)
2017-02-27 12:19:08 +01:00
Dirk Ziegelmeier
0b299f96e9 Add CHANGELOG to lwIP HTML documentation
(cherry picked from commit ee3154999a1b40c08759de1183c4a6fd46b71e68)
2017-02-27 12:18:26 +01:00
Dirk Ziegelmeier
777d54f0e4 Retry 1 to fix bug #50064
Accidentally used the wrong destination HW addr

(cherry picked from commit 645ca84704db70f6dd29aefdec7bfbf6d9fc01f4)
2017-02-27 12:17:41 +01:00
Dirk Ziegelmeier
8c6ac8eb59 Optimize my last fix in etharp.c, I missed the variable declaration at the beginning of the function
(cherry picked from commit 7aaa888d1d27e4adb45c7ebdf5ed9bd42cc9812f)
2017-02-27 12:17:41 +01:00
Dirk Ziegelmeier
4fc3770278 Remove special ARP reply optimization from etharp.c
- Code duplication with etharp_raw()
- No great effect on perfomance
- May make reworking PBUF handling code more complicated (see bug #49914)
- The check for p->type == PBUF_REF is a strange special case, too
- Simon also voted to remove it

(cherry picked from commit 47bac3c11fd1a5da2822ac0d6c516db11901fb9f)
2017-02-27 12:17:40 +01:00
Dirk Ziegelmeier
e53c84654e Fix bug #50064: Zero-copy RX: ARP reply fails with PBUF_REF
Kept the optimized version intact, see discussion in savannah bug tracker

(cherry picked from commit 199c38de2922dd661ed991e577e0709ca15c4980)
2017-02-27 12:17:40 +01:00
sg
d0b0cf983e fix compiling TCP unit tests with IPv6 enabled
(cherry picked from commit b198c877db51ab646504fde03b17f4e6f2a476aa)
2017-02-27 12:17:39 +01:00
Axel Lin
90d68b41df tcp_out: Use LWIP_MIN instead of open-coded for better readability
Make the intention of code more clear by using LWIP_MIN instead of open-coded.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
(cherry picked from commit 141b5def4605a5281c39dcb41b32702cf664359d)
2017-02-27 12:16:17 +01:00
Axel Lin
e6756387b0 tcp_out: Fix comment for last_unsent->oversize_left and tcp_pcb.unsent_oversize
Both last_unsent->unsent_oversize and tcp_pcb.unsent_oversized fields are not
exist, fix the comments.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
(cherry picked from commit 30aedfc3f7ae633b8ef481e8db7db4508172171c)
2017-02-27 12:16:17 +01:00
Dirk Ziegelmeier
4fe1436904 Add some parentheses for better code readability in tcp_in.c
(cherry picked from commit df8e404abd7e7b801c5734efc2d2de6144cb7847)
2017-02-27 12:16:16 +01:00