Commit Graph

4618 Commits

Author SHA1 Message Date
Joel Cunningham
f79eabd24b bug #49533: start persist timer when unsent seg can't fit in window
This commit returns LwIP to previous behavior where if the next unsent
segment can't be sent due to the current send window, we start the
persist timer. This is done to engage window probing in the case that
the subsequent window update from the receiver is dropped, thus
preventing connection deadlock

This commit refines the previous logic to only target the following case:
 1) Next unsent segment doesn't fit within the send window (not
    congestion) and there is some room in the window
 2) Unacked queue is empty (otherwise data is inflight and the RTO timer
    will take care of any dropped window updates)

See commit d8f090a759 (which removed this
behavior) to reference the old logic. The old logic falsely started the
persit timer when the RTO timer was already running.
2016-11-16 09:12:47 -06:00
Roberto Barbieri Carrera
81a32e9b06 Fixed bug #49610: Sometimes, autoIP fails to reuse the same address
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-11-16 12:24:57 +01:00
Joel Cunningham
6dc3a2108a WND_SCALE: duplicate define check & doc cleanup
This commit cleans up a duplicate #if check for LWIP_WND_SCALE in init.c
which was already under #if LWIP_WND_SCALE

This commit also improves documentation for TCP_WND in the window scaling
case to communicate TCP_WND is always the calculated (scaled) window value,
not the value reported in the TCP header

Our developers were confused by having to set both the window and scaling
factor and only after studying the usage of TCP_WND throughout the code, was
it determined to be the calculated (scaled) window
2016-11-11 16:06:54 -06:00
Dirk Ziegelmeier
f965034366 Fix inconsistent return value in udp_sendto_if() - ERR_RTE should always be returned when there is no available route 2016-11-11 11:13:26 +01:00
Dirk Ziegelmeier
fdcd8f6faf Fix bug #49578: lwip_socket_drop_registered_memberships API may not work with LWIP_SOCKET_OFFSET 2016-11-11 11:13:25 +01:00
Erik Ekman
b90682dc8b Update email address
I am leaving Verisure at the end of the month.
2016-11-10 11:19:51 +01:00
Dirk Ziegelmeier
b9dc415178 master: Set version to 2.0.1 2016-11-10 09:59:05 +01:00
Axel Lin
d5dd5241e7 dhcp: Use DHCP_MAX_MSG_LEN_MIN_REQUIRED instead of hard-coded value
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-11-07 12:36:38 +01:00
Sylvain Rochet
c4eb52dcff PPP: set protocol_list[] const
This array is a constant list of protocols, save some ram space by
adding the const modifier it deserves.
2016-11-06 20:00:31 +01:00
Sylvain Rochet
1e6c4ac017 PPP, IPCP: check that the peer is allowed to use the IP address it wants
This is done in the pppd upstream and was disabled because we don't have
the allowed addresses list required for the auth_ip_addr function.

This is mostly necessary for PPP in server mode to prevent the peer to
use the IP address it wants instead of the one we want, which is
currently allowed.

Rewrite auth_ip_addr in a simple way where we forbid PPP peer to use
loopback net, a multicast address or a reserved class address. Added
to that we consider that PPP in server mode with peer required to
authenticate must provide the peer IP address, reject any IP address
wanted by peer different than the one we wanted. This is actually
an allowed addresses "list" of one entry that follows what is done
in the unused auth_ip_addr function.
2016-11-06 17:39:59 +01:00
Sylvain Rochet
b978d17ca0 PPP, IPCP: remove obvious FIXME
No-op. This is now unused code and it is pretty self explanatory what
int_option do; it checks that passed parameter is an unsigned integer.
2016-11-06 12:54:26 +01:00
Sylvain Rochet
dde55c6c0e PPP, IPCP: fix reset state before reconnecting
Commit 7df5496e7b revealed a regression introduced in commit 5a71509353
which broke IPCP reset state.

ask_for_local was set to 0 if ouraddr initial value is 0, if
ask_for_local was false go->ouraddr was cleared in reset callback,
commit 5a71509353 breaks it by removing this clearing. This regression
was silent because the whole ppp pcb runtime data was cleared before
reconnecting until commit 7df5496e7b which removed this giant clearing.

Fix it by reintroducing ask_for_local boolean value, with proper initial
value following what unused function ip_check_options do.

Fixes: 7df5496e7b ("PPP, rework initial/reconnect cleanup")
Fixes: 5a71509353 ("PPP, CORE, IPCP: removed useless ask_for_local boolean")
2016-11-05 22:07:04 +01:00
Dirk Ziegelmeier
5d22679c67 Use API function instead of accessing struct members directly 2016-11-05 16:14:11 +01:00
Dirk Ziegelmeier
132dafa3fc Correct macro parentheses in tcpip_priv.h 2016-11-05 15:15:08 +01:00
Dirk Ziegelmeier
54d76ffd6d Remove superfluous local variable in raw.c 2016-11-05 15:13:57 +01:00
Dirk Ziegelmeier
b6f32caaad Fix inet_addr_to_ipaddr_p() macro 2016-11-05 10:51:06 +01:00
David van Moolenbroek
1c9e603299 netif: fix reset of IPv6 addresses in netif_add()
Previously, only the state of the first IPv6 address would be reset,
thus possibly keeping other addresses valid (even though zeroed).
2016-11-04 20:18:25 +01:00
Axel Lin
1a7ba24d13 memp: Fix memp_overflow_check_all failure
p needs to point to LWIP_MEM_ALIGN(memp_pools[i]->base) otherwise it will cause
assertion in overflow checking.

Fixes: c838e1ed5b ("Implement possibility to declare private memory pools")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-11-04 20:16:24 +01:00
Joel Cunningham
d4384cfac4 Sockets: check external FD_SETSIZE against number of sockets
This commit adds a compiler check to verify an external FD_SETSIZE has
enough space to store the configured number of sockets
2016-11-03 08:59:19 -05:00
Erik Ekman
a82ec4499f memp: Check for null in memp_free
When memp_free_pool was split out from memp_free (c838e1ed5b),
the check for freeing the null pointer was lost.

This resulted in the null value being put back in the list of free
objects, causing all subsequent allocations of that type to fail.
2016-11-03 12:17:01 +01:00
Joel Cunningham
7d8989e3ea TCP documentation: fix tcp_pbuf_prealloc typo
This commit fixes a typo in the tcp_pbuf_prealloc documentation that
used "willo" in place of "will"
2016-11-02 14:10:20 -05:00
Dirk Ziegelmeier
5079e4552c Document non-standard functions in sys abstraction layer 2016-10-23 10:34:52 +02:00
Axel Lin
e040132d92 PPP, documentation: Fix example code
Fix the example code in status_cb() because dns_getserver() returns
const ip_addr_t *.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-10-23 10:00:54 +02:00
David van Moolenbroek
760281207e mld6: fix conditional checksumming
The mld_group structure no longer has a 'netif' field, as such
structures are now linked from the corresponding netif structure.
For conditional checksumming, use the calling function's netif
reference instead.
2016-10-23 10:00:47 +02:00
Axel Lin
20fde0be6c ip4_frag: Use LWIP_MIN instead of open-coded
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-10-19 08:37:39 +02:00
Dirk Ziegelmeier
67895e7bdd Fixup new IPv4 fragmentation code - thanks to Zach Smith 2016-10-19 08:36:43 +02:00
Dirk Ziegelmeier
801f26ee0c Minor documentation update 2016-10-16 19:07:55 +02:00
Axel Lin
4dffe521a3 api_msg.c: Trivial code cleanup
Slightly improve readability by testing apiflags with NETCONN_DONTBLOCK.
Also remove an empty else clause.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-10-14 09:20:10 +02:00
Dirk Ziegelmeier
f5f8ab5acf Fix bug #49328: Crash error in ip6_frag due to Assertion Fail 2016-10-13 08:50:47 +02:00
Dirk Ziegelmeier
e3a9f01fe4 Implement task #14180: IPv6 code should not reuse ip6_current_dest_addr() as temporary storage 2016-10-12 21:41:02 +02:00
Dirk Ziegelmeier
37d5691b19 Fix bug #49321: error.h missing opening "#ifdef __cplusplus"
Reported by Martin Kortmann
2016-10-12 07:37:39 +02:00
Erik Ekman
725feb0d4a mdns: Use netif_get/set_client_data helpers 2016-10-11 11:34:59 +02:00
goldsimon
6edde498e3 pbuf_copy: try to fix GCC const warning 2016-10-11 09:52:44 +02:00
goldsimon
d5bfec2e52 ip4_frag: restore "lwip_ntohs" after last change 2016-10-11 09:52:20 +02:00
goldsimon
576f49ee2b Fixed bug #46467: ip_frag() shouldn't modify pbuf in case of a retransmission 2016-10-11 09:47:03 +02:00
goldsimon
697be5c2c3 Make some pbuf functions take const pbuf pointers 2016-10-11 09:23:45 +02:00
Axel Lin
c9cfbe27c1 tcp_out: Remove misleading comment in tcp_pbuf_prealloc()
This comment is incorrect since commit 7d0dab9d7d
"partly fixed bug #25882: TCP hangs on MSS > pcb->snd_wnd
(by not creating segments bigger than half the window)".

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-10-11 09:11:47 +02:00
sg
0a343948d9 Fix netconn/socket race condition when receiving RST while waiting on recvmbox 2016-10-10 21:35:07 +02:00
Dirk Ziegelmeier
ed239c4e71 Apply patch #9139: Invalid format string in dhcp.c
by Thomas Mueller
2016-10-10 09:57:07 +02:00
Dirk Ziegelmeier
695c81762c Minor: Fix comment in etharp.c 2016-10-09 12:28:34 +02:00
Dirk Ziegelmeier
f6e27940bd Make lwIP compile with clang -Wdocumentation -> several documentation fixes 2016-10-09 12:21:39 +02:00
Dirk Ziegelmeier
9cd555c51a Minor: documentation typo fix 2016-10-09 10:24:26 +02:00
Dirk Ziegelmeier
4e74ae4bc9 Minor: documentation updates 2016-10-09 10:23:36 +02:00
Dirk Ziegelmeier
5477aa5a42 Minor: Documentation update 2016-10-09 09:41:26 +02:00
Ari Suutari
70ccea9207 Make sys_restart_timeouts public also for !NO_SYS targets 2016-10-07 20:31:15 +02:00
goldsimon
69be49fdc3 Try to fix !defined(LWIP_PROVIDE_ERRNO) 2016-10-07 16:22:33 +02:00
Axel Lin
740182de3c err: Fixup error code range checking in err_to_errno
This also fixes build error in non-debug build because err_strerr is
guarded by LWIP_DEBUG.

Fixes: a1c0a0185b ("bug #48823: posix errors should be removed from arch.h (to new file 'lwip/errno.h'))"
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-10-07 07:41:21 +02:00
Dirk Ziegelmeier
ad3530ee10 One more compile fix in err.c 2016-10-06 20:20:07 +02:00
Dirk Ziegelmeier
86a92543de Try to fix unix build after Simon's errno changes (need sys_arch.h) 2016-10-06 16:01:32 +02:00
goldsimon
2afc2a52d5 Fix comment on sys_mbox_new() (bug #49279) 2016-10-06 13:25:11 +02:00