Commit Graph

4648 Commits

Author SHA1 Message Date
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
goldsimon
a1c0a0185b bug #48823: posix errors should be removed from arch.h (to new file 'lwip/errno.h') 2016-10-06 13:21:00 +02:00
Dirk Ziegelmeier
05419912e0 def.h: Provide hton* / ntoh* functions to users by default for compatibility (can be turned off)
Add note to UPGRADING document
2016-10-06 13:13:10 +02:00
Dirk Ziegelmeier
13fb616bb2 Cleanup hton*/ntoh* function handling and platform abstraction
Let lwip use functions/macros prefixed by lwip_ internally to avoid naming clashes with external #includes.
Remove over-complicated #define handling in def.h
Make functions easier to override in cc.h. The following is sufficient now (no more LWIP_PLATFORM_BYTESWAP):
#define lwip_htons(x) <your_htons>
#define lwip_htonl(x) <your_htonl>
2016-10-06 12:55:57 +02:00
Dirk Ziegelmeier
0c06073819 Avoid code duplication in def.c 2016-10-06 09:26:59 +02:00
Dirk Ziegelmeier
50e09ccd2c Add note about new abstactions for itoa(), strnicmp(), stricmp() and strnstr() to UPGRADING document 2016-10-06 09:22:16 +02:00
Dirk Ziegelmeier
fa211096c2 Fix macro name clash with windows headers in TFTP server
Reported by Gisle Vanem
2016-10-05 21:02:46 +02:00
Axel Lin
87172d6d35 mdns: Use NETIF_TO_HOST at appropriate places
Trivial cleanup, use NETIF_TO_HOST macro to get mdns_host from netif.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-10-05 11:23:08 +02:00
Elias Reichart
60a507f88b ETHARP_TABLE_MATCH_NETIF is also used in the etharp_output shortcut 2016-10-04 22:15:59 +02:00
David van Moolenbroek
0d7805a86a tcp: fix FIN ACK handling with unsent data
TCP's snd_nxt represents the next sequence number after sent data, and
as such does not cover any unsent data queued on the connection.  The
current implementation does not take the latter point into account
when processing FIN acknowledgments, mistakenly assuming that an
outgoing FIN is ACK'ed when the acknowledgment covers up to snd_nxt
while there is still unsent data.  This patch adds a check for unsent
data to correct this, effectively preventing that TCP connections are
closed prematurely.
2016-10-04 22:12:13 +02:00
David van Moolenbroek
9ba9dee2aa tcp: advance next seq nr for zero window probes
It is possible that the byte sent as a zero window probe is accepted
and acknowledged by the receiver side without the window being opened.
In that case, the stream has effectively advanced by one byte, and
since lwIP did not take this into account on the sender side, the
result was a desynchronization between the sender and the receiver.
That situation could occur even on a lwIP loopback device, after
filling up the receiver side's receive buffer, and resulted in an ACK
storm. This patch corrects the problem by advancing the sender's next
sequence number by one as needed when sending a zero window probe.
2016-10-04 22:06:05 +02:00
Dirk Ziegelmeier
95754ba95a Another try to fix bug #49264: Crash Error when LWIP_SOCKET_OFFSET is in use 2016-10-04 14:05:56 +02:00
Dirk Ziegelmeier
bef7873042 ND6: Always set neighbor_cache.state together with counter value to avoid inconsistency 2016-10-04 13:59:05 +02:00
Dirk Ziegelmeier
ec236da972 Add comment for my last changes 2016-10-04 13:36:30 +02:00
Dirk Ziegelmeier
ee27daffc4 Fix bug #48876: nd6: timers should be in ticks, not ms
delay_time and stale_time are ticks now.
reachable_time and invalidation_timer are untouched since they may originate from telegram values -> not converting them to ticks avoids an integer division
2016-10-04 13:30:23 +02:00
goldsimon
cdc97d2779 Correctly fix bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer 2016-10-04 12:35:51 +02:00
goldsimon
d9c6badc55 Revert "Fixed bug #49209: netconn_drain() fails to handle 'netconn_aborted' pointer"
This reverts commit 0e2354e658.
2016-10-04 12:35:50 +02:00
Dirk Ziegelmeier
30251b1404 Fix bug #49264: Crash Error when LWIP_SOCKET_OFFSET is in use
Handle LWIP_SOCKET_OFFSET in lwip_socket_drop_registered_memberships, lwip_socket_unregister_membership and lwip_socket_register_membership.
2016-10-04 12:34:53 +02:00
Dirk Ziegelmeier
d1ed89b2e4 Fix accidental TAB in tftp_server.h 2016-10-04 10:31:43 +02:00
Dirk Ziegelmeier
81549578bf Fix compile of TFTP with MSVC 2016-10-04 08:54:52 +02:00
Dirk Ziegelmeier
f8683499a6 TFTP: Add missing newline at end of file 2016-10-03 14:33:57 +02:00