4890 Commits

Author SHA1 Message Date
goldsimon
92f23d6ca0 set lwip version to 2.0.3 RELEASE STABLE-2_0_3_RELEASE 2017-09-15 20:11:17 +02:00
goldsimon
750c9a750b UPGRADING: added a note for 2.0.2 that was forgotten back then 2017-09-15 13:34:59 +02:00
goldsimon
8244fb523c Adapt CHANGELOG to changes for 2.0.3 2017-09-15 13:28:39 +02:00
goldsimon
a13c488e52 Fix bug #51687 (tcp_close(): is it OK to return ERR_MEM if TF_CLOSEPEND is set?)
(cherry picked from commit 1d4ca0bff66e6f1136291f387293eee678d1f2fe)

# Conflicts:
#	src/core/tcp.c
2017-09-15 13:19:11 +02:00
goldsimon
e8a3d42e2d Fix bug #51937 by checking TF_CLOSED at the end of all pcb callbacks in tcp_input()
(cherry picked from commit 86abfbe0877c891f27b52e249cf8d1d3b4d08705)
2017-09-15 12:59:58 +02:00
goldsimon
66120f7d79 refactor tcp_input a bit in preparation of a fix for bug #51937
(cherry picked from commit a8ac37f419b7f8d451605d56b19b904e88d25bf2)

# Conflicts:
#	src/core/tcp_in.c
2017-09-15 12:59:57 +02:00
goldsimon
1d04b06450 Fixed bugs #51606 and #51535: IPv4 reassembly could be finished although there are holes
(cherry picked from commit 5ea7f507c3d05ab86bdc14de0f016f2778db8cb3)

# Conflicts:
#	test/unit/Filelists.mk
#	test/unit/lwipopts.h
2017-09-15 12:52:40 +02:00
goldsimon
c51e6fbb12 Fixed bug #51623: DHCP request XID should probably be regenerated for INIT-REBOOT
(cherry picked from commit a81b19aa62a326aa93bc43d5e9ffb78e4bdde20b)
2017-09-15 12:52:19 +02:00
goldsimon
9b19266e3d ip4_reass: fixed bug #51596 (Insufficient overlap check)
(cherry picked from commit 500598658df1d8674b7d25141983cf5452585d9d)
2017-09-15 12:52:18 +02:00
goldsimon
a2ac9b045a ip4_reass: fixed bug #51597 (Last fragment is assumed to have arrived even if it was discarded)
(cherry picked from commit 3dedfa3d1fbb5620cb4c9255b5bed8f4dcd6352b)

# Conflicts:
#	src/core/ipv4/ip4_frag.c
2017-09-15 12:52:17 +02:00
goldsimon
737ed228c9 ip4_reass: fixed bug #51595 (ip_reass_pbufcount may be updated incorectly)
(cherry picked from commit f1072fee8ab171b4b878b3718bf1c7a4cf340e1d)

# Conflicts:
#	src/core/ipv4/ip4_frag.c
2017-09-15 12:52:04 +02:00
Matthias Hofmann
82e5a18b50 Fix using DHCP IP configuration after lease time is expired.
Signed-off-by: goldsimon <goldsimon@gmx.de>
(cherry picked from commit 9b06d71aebf692de53664dadff836c4c412c1ec6)
2017-09-15 12:50:08 +02:00
Pascal Quantin
ac880ea907 Fixed bug #51528 (Bug when parsing WND_SCALE option)
Signed-off-by: goldsimon <goldsimon@gmx.de>
(cherry picked from commit 2e78b6dcae8864f5d2a6775b6c41b08683694e58)
2017-09-15 12:49:51 +02:00
goldsimon
32aa50cfbc Fix sys_timeouts_init() for LWIP_TCP==0 (see patch #9375)
(cherry picked from commit 7b45f3fa3fcbf7e7997c732cf8d13b9d469c6d1b)
2017-09-15 12:49:29 +02:00
Axel Lin
e6fa613633 tcp: Remove unreachable code in tcp_close_shutdown_fin
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
(cherry picked from commit 9bbb741247cc4dc6bb748498218addbd79d82372)
2017-09-15 12:49:00 +02:00
Dirk Ziegelmeier
c6b19cad34 Fix bug #50932: LWIP-provided byteorder functions defined in the wrong scope
Apply suggested fix from "Fayek"
(cherry picked from commit fe8c62e7b64559ed43199e1b6e830e75f6079aed)
2017-09-15 12:48:47 +02:00
goldsimon
f389d78f7e Fixed bug #50838 (mem.c needs SYS_ARCH_PROTECTION around MEM_STATS)
(cherry picked from commit 3770adccfd3d6103f8b26c4ad1849fbb5297476c)
2017-09-14 09:27:50 +02:00
Dirk Ziegelmeier
dced7dad41 Apply patch from Kudratov Olimjon: Array index used before limits check
while ((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) {
should be
while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {

See https://jira.reactos.org/browse/CORE-8978 for more info.
(cherry picked from commit 32aa9a41e2013e5ee6eee09317a848647e37badf)
2017-09-14 09:26:33 +02:00
goldsimon
56a295f0a0 dhcp_parse_reply: return ERR_VAL instead of asserting on offset-out-of-pbuf
(cherry picked from commit 33466ee6a89ec37c62c0febea55caa5e3384c612)
2017-09-14 09:23:56 +02:00
Dirk Ziegelmeier
aecb1b9eb0 Fix bug #50618: dhcp_remove_struct() macro does not work
Patch by Benjamin Silvestre

(cherry picked from commit 819224f0e53445d073985ded9fc2e8c2f6032928)
2017-09-14 09:20:37 +02:00
Mikhail Lappo
dbb3b3a3a1 Possible null-pointer dereference
The value should be dereferenced after
assertion is performed. This can lead
to crash

(cherry picked from commit 7eba14cb76a131f262c2a760df4bb9402f315a64)
2017-09-14 09:19:51 +02:00
Mikhail Lappo
77c12bb124 Possible null-pointer dereference
In assertion the pointer that is potentialy
null is dereferenced. The check for null was
located after.

(cherry picked from commit eba1b971c024e489c4dadff98ed4a4c4aeb64465)
2017-09-14 09:18:55 +02:00
Dirk Ziegelmeier
0623dc4038 Apply [patch #9287] Possible null-pointer dereference from Mikhail Lappo in a modified way
Moved the debug output to a location where we know that newpcb != NULL
Fixes possible NULL pointer dereferencing in debug message output

(cherry picked from commit 9e20fe2cfb01428e366e97fc0366cff9920ae921)
2017-09-14 09:18:30 +02:00
goldsimon
f5438b1b43 try to satisfy clang's '-Wempty-body'
(cherry picked from commit aef2accfa388050474de97e8c9984545af669aa0)
2017-09-14 09:16:42 +02:00
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