History log of /seL4-camkes-master/projects/lwip/src/core/tcp_in.c
Revision Date Author Comments
# 342d0ead 12-Jun-2018 Matthias Hofmann <matthias.hofmann@diehl.com>

Add null pointer checks for TCP, UDP and netif

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>


# 77d0ee09 26-Jan-2018 goldsimon <goldsimon@gmx.de>

tcp: add LWIP_HOOK_TCP_INPACKET_PCB

This hook is called from tcp_input() for all kinds of input pcbs when
selected to receive a pbuf (LISTEN, TIME_WAIT, rest). I can parse or
drop an rx pbuf.

Signed-off-by: goldsimon <goldsimon@gmx.de>


# 0e85582b 24-Jan-2018 goldsimon <goldsimon@gmx.de>

tcp: introduce ext_args per pcb

This introduces the concept of ext (external/extended) arguments per
tcp_pcb (also for listening pcbs) to store more data than just one
"void *arg" per pcb. The "arg" is for use to applications, whereas
the ext_args may be used by frameworks and leave "arg" untouched.

In addition to a void pointer, callbacks are added to help frameworks
migrate arguments from listen pcb to connection pcb and to free args
when the pcb is freed.

Signed-off-by: goldsimon <goldsimon@gmx.de>


# ebe782ba 24-Jan-2018 goldsimon <goldsimon@gmx.de>

tcp: centralize freeing tcp pcbs to memp_free

This should make it easier to add debugging messages or other hooks
to the point where tcp pcbs are deallocated.

Signed-off-by: goldsimon <goldsimon@gmx.de>


# f334ac68 02-Jan-2018 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Work on task #14780: Add debug helper asserts to ensure threading/locking requirements are met
Add LWIP_ASSERT_CORE_LOCKED() in several places


# dbd72695 21-Sep-2017 Our Air Quality <info@ourairquality.org>

[PATCH] Replace the OOSEQ max bytes and pbufs constants with functions.

Some systems need to take into account an RX buffer pool size when
advising an appropriate number of RX pbufs to queue on the ooseq
list. For some systems there is a practical hard limit beyond which
the rx pool becomes exhausted blocking reception of further buffers
until some are freed.

It also helps to be able to consider the available dynamic memory when
advising an appropriate maximum number of bytes to buffer on the ooseq
list.

These decisions can also benefit from knowing the number already
allocated on a particular pcb, so the ooseq tcp segement is passed to
these functions. For example, if the system only wants to allow the
total number of rx pbufs queued on all the ooseq lists to grow by one
and a pcb already has two then it can return three for this call, but
might return one for another call - supporting a greedy allocation
strategy.

Signed-off-by: goldsimon <goldsimon@gmx.de>


# 7dcc407c 21-Sep-2017 goldsimon <goldsimon@gmx.de>

tcp_in: favour local variables over ifdef blocks


# 8f459cc2 21-Sep-2017 goldsimon <goldsimon@gmx.de>

Make TCP_OOSEQ_MAX_BYTES and TCP_OOSEQ_MAX_PBUFS work independently


# 6d2b181c 21-Sep-2017 goldsimon <goldsimon@gmx.de>

tcp_in: favour code block over #ifdef blocks for local variables only used in TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS configs


# 931b5e64 17-Sep-2017 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Reformat core code using astylerc


# b7e5de38 08-Sep-2017 Jakub Schmidtke <jschmidtke@carnegietechnologies.com>

Fixed removing unneeded TCP SACKs

TCP SACKs were removed after some changes in the ooseq queue,
but before all unneeded packets were removed from it.
Because of that, we would sometimes include SACKs
for data already delivered in-order.

Signed-off-by: goldsimon <goldsimon@gmx.de>


# 86abfbe0 09-Sep-2017 goldsimon <goldsimon@gmx.de>

Fix bug #51937 by checking TF_CLOSED at the end of all pcb callbacks in tcp_input()


# a8ac37f4 09-Sep-2017 goldsimon <goldsimon@gmx.de>

refactor tcp_input a bit in preparation of a fix for bug #51937


# dc7a9c8c 03-Sep-2017 Our Air Quality <info@ourairquality.org>

tcp_in: correct some loops continuing without maintaining a prev pointer.

This problem would appear to have only affected systems with multiple
interfaces. It was noted causing tcp resets when the pcb was lost, and there
might have been other associated problems.

Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>


# c7edfdf9 25-Aug-2017 goldsimon <goldsimon@gmx.de>

Fix bug #51765 and fix commit 90873d6: call tcp_rexmit_fast() more than once on dupacks since the actual transmission is guarded by TF_INFR, not by pcb->dupacks


# f582c883 03-Aug-2017 Joel Cunningham <joel.cunningham@me.com>

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


# 1ed1cfe8 21-Aug-2017 goldsimon <goldsimon@gmx.de>

TCP: simplify trimming left edge & use pbuf_remove_header() instead of pbuf_header()


# 3d82155d 09-Aug-2017 Joel Cunningham <joel.cunningham@me.com>

tcp: use TCP_WND_INC for dupack > 3 case

TCP_WND_INC abstracts the rollover handling and allows the window to
reach it's maximum value


# b8a3cf3a 08-Aug-2017 Joel Cunningham <joel.cunningham@me.com>

tcp: use tcp_set_flags() rather than manually setting flag


# ba7a3204 09-Aug-2017 Joel Cunningham <joel.cunningham@me.com>

tcp: use tcp_ack_now rather than manually setting TF_ACK_NOW


# 90873d6c 08-Aug-2017 goldsimon <goldsimon@gmx.de>

Continue fixing the spirit of bug #51663: don't change pcb state if retransmission can't be done because segments are still queued for transmission

- add a better-documented static function tcp_output_segment_busy
- try to reduce the number of checks
- tcp_rexmit_rto: iterate pcb->unacked only once
- no need to check for ref==1 in tcp_rexmit_fast when tcp_rexmit does
- call tcp_rexmit_fast if dupacks >= 3 (not == 3) and use TF_INFR flag to guard the fast-rexmit case (that way, it's triggered again on the next dupack)


# a1c7924c 04-Aug-2017 goldsimon <goldsimon@gmx.de>

task #14597: cleanup pbuf_header usages (use pbuf_add_header/pbuf_remove_header instead)


# 9b5d8f14 25-Jul-2017 goldsimon <goldsimon@gmx.de>

tcp_getoptbyte() -> tcp_get_next_optbyte() (to make it clearer that this function modifies something - not only a getter)


# 2e78b6dc 24-Jul-2017 Pascal Quantin <pascal.quantin@gmail.com>

Fixed bug #51528 (Bug when parsing WND_SCALE option)

Signed-off-by: goldsimon <goldsimon@gmx.de>


# 328134fd 15-Jul-2017 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Fix two -Wconversion warnings


# f3c86095 06-Jul-2017 goldsimon <goldsimon@gmx.de>

-Wconversion (still far from finished) and other minor compilation fixes...


# 0b91888e 04-Jul-2017 goldsimon <goldsimon@gmx.de>

remove invalid TODO comment


# 1a1c360f 03-Jul-2017 goldsimon <goldsimon@gmx.de>

Fixed LWIP_TCP_SACK_VALID and its usage


# 6796bcf7 03-Jul-2017 goldsimon <goldsimon@gmx.de>

Cleaned up a bit after merging SACK_OUT support (mostly coding style)


# b1a3c37c 29-Jun-2017 Jakub Schmidtke <jschmidtke@carnegietechnologies.com>

Partial SACK (RFC 2018) support

Adds partial support for selective acknowledgements (RFC 2018).
This change makes lwIP negotiate SACK support, and include SACK
data in outgoing empty ACK packets. It does not include it
in outgoing packets with data payload.
It also does not add support for handling incoming SACKs.

Signed-off-by: goldsimon <goldsimon@gmx.de>


# d262132b 03-Jul-2017 goldsimon <goldsimon@gmx.de>

work on -Wconversion...


# 6e62b609 17-Jun-2017 Our Air Quality <info@ourairquality.org>

Silence some unsed variable warnings.


# 3eaf9761 31-May-2017 Joel Cunningham <joel.cunningham@me.com>

tcp: fix cwnd rollover introduced by ABC

Changes for TCP Appropriate Byte Counting introduce a potential cwnd
rollover by not taking into account integer promotion on tcpwnd_size_t
during inequality comparisions

This fixes the issue by introducing a macro TCP_WND_INC which detects
the rollover correctly and now holds the tcpwnd_size_t at the maximum
value rather than not incrementing the window. This provides a slight
performance improvement by allowing full use of the tcpwnd_size_t number
space for the congestion window


# c03fef9a 03-May-2017 Joel Cunningham <joel.cunningham@me.com>

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


# ddf4e174 03-May-2017 Joel Cunningham <joel.cunningham@me.com>

tcp: indentation fix in tcp_receive()

TCP_OVERSIZE block was moved out from inside the while loop and thus
should be on column 7


# 4cf6f9ed 03-May-2017 goldsimon <goldsimon@gmx.de>

tcp_free_acked_segments: fix debug printf parameter errors, fix unused parameters for !LWIP_DEBUG and/or LWIP_NOASSERT


# 77820679 02-May-2017 goldsimon <goldsimon@gmx.de>

task #14433: TCP: combine unsent/unacked queue loops in tcp_receive()


# 5800cf51 03-May-2017 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Work on task #14494: Implement SO_BINDTODEVICE
TCP needs additional netif handling


# 0545eba0 02-May-2017 goldsimon <goldsimon@gmx.de>

Fixed copy&paste error found by travis-ci...


# 13ffc86a 02-May-2017 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Start working task #14494: Implement SO_BINDTODEVICE
Implement binding TCP, UDP and RAW PCBs to a netif


# ad779e5c 21-Apr-2017 Joel Cunningham <joel.cunningham@me.com>

doc: clarify RST handling comment

This clarifies the documentation around RST handling to document
the approach follows RFC 5961 and is not a standards violation


# de90d03e 12-Apr-2017 Joel Cunningham <joel.cunningham@me.com>

tcp: task #14128 - Appropriate Byte Counting support

This commit adds TCP Appropriate Byte Counting (ABC) support based on
RFC 3465

ABC replaces the previous congestion window growth mechanism and has been
configured with limit of 2 SMSS. See task #14128 for discussion on
defaults, but the goal is to mitigate the performance impact of delayed
ACKs on congestion window growth

This commit also introduces a mechanism to track when the stack is
undergoing a period following an RTO where data is being retransmitted.

Lastly, this adds a unit test to verify RTO period tracking and some
basic ABC cwnd checking


# c7222611 22-Mar-2017 Joel Cunningham <joel.cunningham@me.com>

tcp: bug #50614: move unsent queue check/pcb->snd_buf update

This commit corrects what looks like an ancient incorrect organization
of the logic for processing an ACK which acks new data. Once moved,
we can also change to using TCP_SEQ_LEQ on ackno instead of TCP_BETWEEN
because ackno has already been checked against snd_nxt

The work of checking the unsent queue and updating pcb->snd_buf (both
steps required for new data ACK) should be located under the conditional
that checks TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)

The comment following the unsent queue check/pcb->snd_buf update even
indicates "End of ACK for new data processing" when the logic is clearly
outside of this check

From what I can tell, this mis-organization isn't causing any incorrect
behavior since the unsent queue checked that ackno was between start of
segment and snd_nxt and recv_acked would be 0 during pcb->snd_buf update.
Instead this is waisted work for duplicate ACKS (can be common) and other
old ACKs


# 5827c168 08-Mar-2017 David van Moolenbroek <david@minix3.org>

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.


# b90a54f9 07-Mar-2017 Joel Cunningham <joel.cunningham@me.com>

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


# f85eed0a 27-Feb-2017 goldsimon <goldsimon@gmx.de>

tcp: fixed bug #50418: LWIP_EVENT_API: fix invalid calbacks for SYN_RCVD pcb


# a3fc3803 10-Feb-2017 sg <goldsimon@gmx.de>

minor: move assert to a slightly better place


# 240cf620 10-Feb-2017 David van Moolenbroek <david@minix3.org>

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.


# df8e404a 13-Jan-2017 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Add some parentheses for better code readability in tcp_in.c


# cceea73c 09-Dec-2016 Joel Cunningham <joel.cunningham@me.com>

bug #49631: handle zero-window probe and refused_data

This commit adds support for responding to a zero-window probe when
the refused_data pointer is set

A zero-window probe is a data segment received when rcv_ann_wnd
is 0. This corrects a standards violation where LwIP would not
respond to a zero-window probe with its current ACK value (RCV.NXT)
when it has refused data, thus leading to the probing TCP closing
out the connection


# a8b986bb 26-Oct-2016 David van Moolenbroek <david@minix3.org>

Add hook for TCP Initial Sequence Number generation

lwIP produces a TCP Initial Sequence Number (ISN) for each new TCP
connection. The current algorithm is simple and predictable however.
The result is that lwIP TCP connections may be the target of TCP
spoofing attacks. The problem of such attacks is well known, and a
recommended ISN generation algorithm is standardized in RFC 6528.
This algorithm requires a high-resolution timer and cryptographic
hashing function, though. The implementation (or best-effort
approximation) of both of these aspects is well beyond the scope of
lwIP itself.

For that reason, this patch adds LWIP_HOOK_TCP_ISN, a hook that
allows each platform to implement its own ISN generation using
locally available means. The hook provides full flexibility, in
that the hook may generate anything from a simple random number
(by being set to LWIP_RAND()) to a full RFC 6528 implementation.

Implementation note:

Users of the hook would typically declare the function prototype of
the hook function in arch/cc.h, as this is the last place where such
prototypes can be supplied. However, at that point, the ip_addr_t
type has not yet been defined. For that reason, this patch removes
the leading underscore from "struct _ip_addr", so that a prototype
of the hook function can use "struct ip_addr" instead of "ip_addr_t".

Signed-off-by: sg <goldsimon@gmx.de>


# 6f1304e0 28-Nov-2016 goldsimon <goldsimon@gmx.de>

patch by Ambroz Bizjak: fixed bug #49717 (window size in received SYN and SYN-ACK assumed scaled)


# f6e27940 08-Oct-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Make lwIP compile with clang -Wdocumentation -> several documentation fixes


# 13fb616b 05-Oct-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

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>


# 0d7805a8 29-Sep-2016 David van Moolenbroek <david@minix3.org>

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.


# 198fa5db 30-Aug-2016 Axel Lin <axel.lin@ingics.com>

Remove duplicated include for lwip/inet_chksum.h

Include it once is enough.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>


# 3e23eb76 25-Aug-2016 goldsimon <goldsimon@gmx.de>

fixed compiling TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS (local variable 'p' was hidden)


# 14fb48cd 19-Aug-2016 goldsimon <goldsimon@gmx.de>

minor: whitespace cleanups


# 523b11e6 21-Jul-2016 goldsimon <goldsimon@gmx.de>

fixed bug #48543 (TCP sent callback may prematurely report sent data when only part of a segment is acked) and don't include SYN/FIN in snd_buf counter (patch by Ambroz Bizjak)


# dff46e38 19-Jul-2016 sg <goldsimon@gmx.de>

Fixed bug #48539 (possible crash when packet received in SYN_SENT state)


# 6adeb706 19-Jul-2016 goldsimon <goldsimon@gmx.de>

change tcp_pcb->acked to be a global variable: used in one call stack only (idea by Ambroz Bizjak)


# 421dab87 11-Jul-2016 sg <goldsimon@gmx.de>

fixed bug #48476 (TCP sent callback called wrongly due to picking up old pcb->acked


# 18c332ae 08-Jul-2016 Ambroz Bizjak <ambrop7@gmail.com>

fixed bug #48402 (Bug in skipping over TCP options)

Signed-off-by: goldsimon <goldsimon@gmx.de>


# 2e26fc92 03-Jul-2016 Michael Brown <mcb30@ipxe.org>

tcp: Avoid 3-second delay for a half-open connection

If lwIP encounters a half-open connection (e.g. due to a restarted
application reusing the same port numbers) it will correctly send a
RST but will not resend the SYN until one retransmission timeout later
(approximately three seconds). This can increase the time taken by
lpxelinux.0 to fetch its configuration file from a few milliseconds to
around 30 seconds.

Fix by immediately retransmitting the SYN whenever a half-open
connection is detected.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: goldsimon <goldsimon@gmx.de>


# e6bc591a 30-Jun-2016 goldsimon <goldsimon@gmx.de>

fixed bug #48170 (Vulnerable to TCP RST spoofing) (original patch by Fabian Koch)


# d31d2ee8 30-Jun-2016 goldsimon <goldsimon@gmx.de>

Revert "fixed bug #48170 (patch by Fabian Koch)"

This reverts commit 236bc194222b604f251cd86d4715cd05d9e40f94.
The fix introduced bug #48328 -> reverted


# 236bc194 27-Jun-2016 goldsimon <goldsimon@gmx.de>

fixed bug #48170 (patch by Fabian Koch)


# 102f5882 25-Jun-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Fix several CLANG format string warnings


# 4e241fbf 13-Jun-2016 sg <goldsimon@gmx.de>

some minor improvements to the tcp options checking code


# b9a2ee8a 13-Jun-2016 Henrik Persson <henrik.persson@verisure.com>

[PATCH] Drop instead of ASSERT in tcp_input header parsing

Since allowing input validation to trip the ASSERT handler is bad,
let's just drop the packets instead if validation fails.

Signed-off-by: sg <goldsimon@gmx.de>


# 27f03798 25-Mar-2016 sg <goldsimon@gmx.de>

Fixed possible problems with tcp_backlog_delayed/tcp_backlog_accepted


# 5b0a47ca 24-Mar-2016 goldsimon <goldsimon@gmx.de>

removed unused return values of tcp_listen_input & tcp_timewait_input; fixed unused variable warning


# 7721b201 23-Mar-2016 sg <goldsimon@gmx.de>

call accept-callback with ERR_MEM when allocating a pcb fails on passive open to inform the application about this error; ATTENTION: applications have to handle NULL pcb in accept callback!


# dd80759b 22-Mar-2016 sg <goldsimon@gmx.de>

tcp: changed accept handling to be done internally: the application does not have to call tcp_accepted() any more. Instead, when delaying accept (e.g. sockets do), call tcp_backlog_delayed()/tcp_backlog_accepted() (fixes bug #46696)


# f9ce31f9 02-Mar-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

TCP: Implement dual stack support using new IP_ANY_TYPE introduced at UDP


# 9885d5d9 29-Feb-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Apply patch from Simon to fix buffer overflow handling tcp_in.c which was discovered by Coverity


# fd891081 24-Feb-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

minor: Cleanups in raw/tcp/udp code by using macros and reducing #ifdefs


# c805843e 22-Feb-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Change signature of ip_output, ip_output_if, ip_output_if_src, ip_output_hinted, ip_route, ip_netif_get_local_ip, ip_route_get_local_ip and tcp_eff_send_mss not to take an isipv6 parameter. Use the IP version of the destination address instead.


# 880f1008 22-Feb-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Together with Simon: Eliminate last instances of isipv6 member in pcbs;
Don't allow NULL pointers (IPv4 ANY) in connect() and sendto() functions as destinations since this does not make sense.


# 50303eea 21-Feb-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Reduce PCB_ISIPV6 macro usage some more


# 5a25652c 21-Feb-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Eliminate IP_PCB_IPVER_INPUT_MATCH macro


# 5809b013 20-Feb-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Reduce usage of PCB IP version flag in raw and tcp code. Maybe we can figure out a good way for dual-stack UDP when we manage to remove the flag (nearly) entirely from the code.


# 91586bc6 20-Nov-2015 Axel Lin <axel.lin@ingics.com>

Drop #if TCP_DEBUG guard around tcp_debug_print_state calls

The #if TCP_DEBUG guard can be removed because tcp_debug_print_state()
print nothing if !TCP_DEBUG.

Signed-off-by: Axel Lin <axel.lin@ingics.com>


# c12fa7b4 09-Oct-2015 sg <goldsimon@gmx.de>

started to move "private" header files containing implementation details to "lwip/priv/" include directory to seperate the API from the implementation.


# b401f425 07-Oct-2015 goldsimon <goldsimon@gmx.de>

minor: fixed coding style (lwip style)


# 2b971400 06-Oct-2015 sg <goldsimon@gmx.de>

minor: coding style


# 22df34fc 06-Oct-2015 sg <goldsimon@gmx.de>

minor/coding style: removed spaces before line ending (from file header)


# 490581a0 06-Oct-2015 sg <goldsimon@gmx.de>

minor/coding style: removed spaces before line ending


# 6f0dceee 17-Sep-2015 sg <goldsimon@gmx.de>

fixed some printf formatters (mainly for window scaling code)


# 72b3f3f6 17-Sep-2015 Joel Cunningham <joel.cunningham@me.com>

Hook up TCP cachehit stat

This commit hooks up the TCP cachehit stat to the PCB locality feature
so that when a PCB is moved to the head of the list and a segment comes
in, we consider this a cache hit

This also matches the usage of the cachehit stat in UDP


# 8a0fb03e 08-Sep-2015 goldsimon <goldsimon@gmx.de>

Separate mib2 counter/table callbacks from snmp agent. This both cleans up the code and should allow integration of a 3rd party agent/mib2.


# aa0e41c3 01-Sep-2015 sg <goldsimon@gmx.de>

task #12178: hardware checksum capabilities can be configured per netif (use NETIF_SET_CHECKSUM_CTRL() in your netif's init function)


# b9a8310f 30-Aug-2015 sg <goldsimon@gmx.de>

fixed bug #44023: TCP ssthresh value is unclear: ssthresh is set to the full send window for active open, too, and is updated once after SYN to ensure the correct send window is used


# 98f98048 28-Aug-2015 goldsimon <goldsimon@gmx.de>

TCP window scaling: don't parse window scaling option on retransmission


# 06d8dba4 28-Aug-2015 goldsimon <goldsimon@gmx.de>

fixed bug #45559: Window scaling casts u32_t to u16_t without checks


# de8e8107 19-Aug-2015 sg <goldsimon@gmx.de>

fixed bug #45120: Broadcast & multiple interfaces handling


# 11f350e6 03-Aug-2015 goldsimon <goldsimon@gmx.de>

Fixed ~ warnings in a different way


# 4dc3c7a6 03-Aug-2015 goldsimon <goldsimon@gmx.de>

Fixed warnings about NULL check not required (ip_addr_isany) and implicit conversion (~)


# f5077dc9 22-Apr-2015 goldsimon <goldsimon@gmx.de>

fixed some more missing casts...


# 19855791 09-Apr-2015 goldsimon <goldsimon@gmx.de>

fixed compiler warning (signed/unsigned comparison) introduced when fixing bug #44766


# ce7e31cd 09-Apr-2015 sg <goldsimon@gmx.de>

task #12722 (improve IPv4/v6 address handling): renamed ip_addr_t to ip4_addr_t, renamed ipX_addr_t to ip_addr_t and added IP version;
ip_addr_t is used for all generic IP addresses for the API, ip(4/6)_addr_t are only used internally or when initializing netifs or when calling version-related functions


# 4ff1eb18 07-Apr-2015 goldsimon <goldsimon@gmx.de>

fixed bug #44766 (LWIP_WND_SCALE: tcphdr->wnd was not scaled in two places)


# 33d5e646 21-Mar-2015 sg <goldsimon@gmx.de>

fixed bug #41318 (Bad memory ref in tcp_input() after tcp_close())


# c00a62d3 21-Mar-2015 sg <goldsimon@gmx.de>

fixed bug #38468 (tcp_sent() not called on half-open connection for data ACKed with the same ack as FIN)


# c8587e12 20-Mar-2015 Sylvain Rochet <gradator@gradator.net>

tcp_in: typo fix. Fixes bug #4458944589.


# 32f6e7e2 11-Feb-2015 Clint Sbisa <csbisa@amazon.com>

tcp: Fix ooseq processing when seqno is near 2^32

An edge case in out-of-sequence TCP packet processing did not use the
appropriate macro to check if the sender overran the recieve window.

Consequently, this case sometimes evaluated to true when it shouldn't, which
resulted in various bad behavior, including trying to resize a TCP buffer to 4
gigabytes.


# 974a853f 11-Feb-2015 sg <goldsimon@gmx.de>

patch #8423 "arch/perf.h" should be made an optional item


# 2775fb5a 16-Jan-2015 goldsimon <goldsimon@gmx.de>

fixed bug #20506 "Initial congestion window is very small" again by implementing the calculation formula from RFC3390


# 33237419 18-Sep-2014 Simon Goldschmidt <goldsimon@gmx.de>

Parts of patch #8397 Typos corrected in comments and text outputs


# 974f6982 03-Jun-2014 Simon Goldschmidt <goldsimon@gmx.de>

fixed bug #37969 SYN packet dropped as short packet in tcp_input function


# 035ecef8 06-Apr-2014 Simon Goldschmidt <goldsimon@gmx.de>

Fixed bug #36210 lwIP does not elicit an empty ACK when received unacceptable ACK


# 2f02120f 20-Feb-2014 Simon Goldschmidt <goldsimon@gmx.de>

Fixed typo.


# 751deac9 12-Feb-2014 Simon Goldschmidt <goldsimon@gmx.de>

Another fix to window scaling: support queueing more than 64 KByte in ooseq data


# 3273c68b 07-Feb-2014 Simon Goldschmidt <goldsimon@gmx.de>

Added comments to clarify the LWIP_TCP_TIMESTAMPS option.


# a44e2190 07-Feb-2014 Simon Goldschmidt <goldsimon@gmx.de>

TCP window scaling: change tcp_pcb::acked to u32_t when window scaling is enabled to prevent an overflow when more than 64 Kbytes are ACKed


# d2a89b42 06-Feb-2014 Simon Goldschmidt <goldsimon@gmx.de>

patch #6537/#7858: TCP window scaling support (OOS queueing still needs special handling)


# 7d0dab9d 12-Feb-2012 goldsimon <goldsimon@gmx.de>

partly fixed bug #25882: TCP hangs on MSS > pcb->snd_wnd (by not creating segments bigger than half the window)


# 13075460 22-Jan-2012 goldsimon <goldsimon@gmx.de>

fixed bug #35305: pcb may be freed too early on shutdown(WR)


# dd872906 25-Nov-2011 goldsimon <goldsimon@gmx.de>

fixed bug #31177: tcp timers can corrupt tcp_active_pcbs in some cases


# edcc859b 28-Oct-2011 goldsimon <goldsimon@gmx.de>

fixed bug #34638: Dead code in tcp_receive - pcb->dupacks


# 0fb07ba3 23-Oct-2011 goldsimon <goldsimon@gmx.de>

- moved processing of refused_data to an own function (used from tcp_fasttmr and tcp_input);
- improved readability of tcp_slowtmr by using defines to access keepalive variables


# 0333e816 13-Oct-2011 Simon Goldschmidt <goldsimon@gmx.de>

fixed bug #34517 (persist timer is started although no zero window is received) by starting the persist timer when a zero window is received, not when we have more data queued for sending than fits into the window


# b4c4fae3 11-Oct-2011 Simon Goldschmidt <goldsimon@gmx.de>

slightly rearranged freeing an acked segment to prevent keeping the reference too long


# 5c68bbe1 29-Sep-2011 Simon Goldschmidt <goldsimon@gmx.de>

Tried to fix bug #32417 ("TCP_OVERSIZE seems to have problems with (fast-)retransmission"): Reset pcb->unsent_oversize in 2 more places...


# 07c610e0 27-Sep-2011 Simon Goldschmidt <goldsimon@gmx.de>

Implemented limiting data on ooseq queue (task #9989) (define TCP_OOSEQ_MAX_BYTES / TCP_OOSEQ_MAX_PBUFS in lwipopts.h), added unit test for this new feature


# 998f109f 27-Sep-2011 Simon Goldschmidt <goldsimon@gmx.de>

fixed bug #28288: Data after FIN in oos queue


# 918470af 23-Sep-2011 Simon Goldschmidt <goldsimon@gmx.de>

fixed bug #33871: rejecting TCP_EVENT_RECV() for the last packet including FIN can lose data


# a0bf8d57 03-Sep-2011 Simon Goldschmidt <goldsimon@gmx.de>

fixed bug #33952 PUSH flag in incoming packet is lost when packet is aggregated and sent to application


# b9c17dd1 01-Sep-2011 Simon Goldschmidt <goldsimon@gmx.de>

fixed bug #34111 RST for ACK to listening pcb has wrong seqno


# f4c0018d 28-Jul-2011 Simon Goldschmidt <goldsimon@gmx.de>

Fixed complier error for CHECKSUM_CHECK_TCP==0


# 2aec3a97 28-May-2011 goldsimon <goldsimon>

use PCB_IS_IPV6(pcb) instead of pcb->isipv6 everywhere


# 6865806b 25-May-2011 goldsimon <goldsimon>

Combined IPv4 and IPv6 code where possible, added defines to access IPv4/IPv6 in non-IP code so that the code is more readable.


# 4bfbe7eb 17-May-2011 goldsimon <goldsimon>

... and finally, we got a first working version of a dual-stack lwIP runnin IPv4 and IPv6 in parallel - big thanks to Ivan Delamer! (this is work in progress, so please beware, test a lot and report problems!)


# 44955164 26-Mar-2011 goldsimon <goldsimon>

Removed 'dataptr' from 'struct tcp_seg' and calculate it in tcp_zero_window_probe (the only place where it was used).


# effcb90f 20-Dec-2010 goldsimon <goldsimon>

Mreged back changes that were lost during the savannah hack 3 weeks ago (using the sources from http://git.infradead.org/users/dwmw2/lwip.git)


# f7479781 22-May-2010 goldsimon <goldsimon>

bug #27352: removed packing from ip_addr_t, the packed version is now only used in protocol headers. Added global storage for current src/dest IP address while in input functions.


# 6ffd2950 16-May-2010 goldsimon <goldsimon>

Free recv_data when TF_RXCLOSED is set


# a8807097 15-May-2010 goldsimon <goldsimon>

Let FIN come through although TF_RXCLOSED is set, send RST when data is received although TF_RXCLOSED is set, added TCP_EVENT_CLOSED for clearer code


# a945bf07 15-May-2010 goldsimon <goldsimon>

SO_REUSE: tcp_input: correctly handle multiple pcbs listening on the same port (but different address): first search for a specific address an only pass to ANY if no specific address has been found listening


# ef0a7ecb 12-May-2010 goldsimon <goldsimon>

Remove uused SOF_* flags, define inherited flags in ip.h, not in tcp_in.c


# cf0b8319 25-Mar-2010 goldsimon <goldsimon>

Fixed bug #29080: Correctly handle remote side overrunning our rcv_wnd in ooseq case.


# b6542b97 05-Mar-2010 goldsimon <goldsimon>

task #7040 (Work on tcp_enqueue): Don't waste memory when chaining segments, added option TCP_OVERSIZE to prevent creating many small pbufs when calling tcp_write with many small blocks of data. Instead, pbufs are allocated larger than needed and the space is used for later calls to tcp_write.


# 2bf1184c 03-Mar-2010 goldsimon <goldsimon>

Added comment after #endif


# bcd4b76d 21-Feb-2010 goldsimon <goldsimon>

Moved stack-internal parts of tcp.h to tcp_impl.h, tcp.h now only contains the actual application programmer's API


# d9157a71 20-Feb-2010 goldsimon <goldsimon>

Task #10088: Correctly implement close() vs. shutdown(). Now the application does not get any more recv callbacks after calling tcp_close(). Added tcp_shutdown().


# 96e9689d 13-Feb-2010 goldsimon <goldsimon>

Use new macro ip_addr_copy where applicable


# 44af02aa 10-Feb-2010 goldsimon <goldsimon>

Fixed wrong printf formatter


# 5d360a67 04-Feb-2010 goldsimon <goldsimon>

Replaced struct ip_addr by typedef ip_addr_t to make changing the actual implementation behind the typedef easier.


# 5fa0347e 29-Jan-2010 goldsimon <goldsimon>

Cleanly separate the portability file inet.h and its contents from the stack: moved htonX- functions to def.h (and the new def.c - they are not ipv4 dependent), let inet.h depend on ip_addr.h and not the other way round. This fixes bug #28732.


# 0644c4c0 27-Jan-2010 goldsimon <goldsimon>

Fixed bug #27871: Calling tcp_abort() in recv callback can lead to accessing unallocated memory. As a consequence, ERR_ABRT means the application has called tcp_abort()!


# e678e1bd 25-Jan-2010 goldsimon <goldsimon>

bug #28659: Missing casts


# 052be0a3 13-Jan-2010 goldsimon <goldsimon>

Added comments


# bf261f4f 27-Dec-2009 goldsimon <goldsimon>

Another fix for bug #28241 (ooseq processing) and adapted corresponding unit test


# 6b6c82aa 24-Dec-2009 kieranm <kieranm>

BUG28241: improve oos sequence processing with patches from Oleg Tyshev.


# b5014b09 06-Dec-2009 goldsimon <goldsimon>

tcp_process: add state info to log message that is used for multiple states ("TCP connection closed")


# 7d46e068 03-Dec-2009 goldsimon <goldsimon>

Fixed bug #28106: dup ack for fast retransmit could have non-zero length


# 3a1c5944 02-Dec-2009 goldsimon <goldsimon>

Fixed bug #27904: TCP sends too many ACKs: delay resetting tcp_input_pcb until after calling the pcb's callbacks


# b900253c 29-Nov-2009 goldsimon <goldsimon>

tcp_receive(): removed unnecessary return value, added comment


# 59a5fb7c 29-Nov-2009 goldsimon <goldsimon>

Fixed bug #28054: Two segments with FIN flag on the out-of-sequence queue, also fixed PBUF_POOL leak in the out-of-sequence code


# 1c018cae 22-Nov-2009 goldsimon <goldsimon>

move tcp_debug_print_state to prevent accessing pcb when it might already be deallocated due to recv_flags == TF_RESET or TF_CLOSED


# 98a58f9e 20-Nov-2009 goldsimon <goldsimon>

tcp_input: move tcp_debug_print_state to prevent accessing pcb when it might already be deallocated due to calling tcp_abort in tcp_process.


# dee1d82c 29-Oct-2009 kieranm <kieranm>

re-work the fast retransmission code to follow algorithm from TCP/IP
Illustrated


# 71ddff49 28-Oct-2009 kieranm <kieranm>

Fix BUG#27445: grow cwnd with every duplicate ACK


# ae2dd38e 25-Oct-2009 goldsimon <goldsimon>

Another fix for bug #26251: RST process in TIME_WAIT TCP state


# 18ab274a 22-Oct-2009 goldsimon <goldsimon>

Fixed bug #26251: RST process in TIME_WAIT TCP state


# 65d1f524 21-Oct-2009 goldsimon <goldsimon>

Changed fix for bug #27215 (TCP sent() callback gives leagin and trailing 1 byte len (SYN/FIN)) by decreasing pcb->acked appropriately


# b7d7559c 18-Oct-2009 goldsimon <goldsimon>

Fixed bug #27215: TCP sent() callback gives leadin and trailing 1 byte len (SYN/FIN)


# d9a50940 15-Oct-2009 goldsimon <goldsimon>

Fixed bug #27329: dupacks by unidirectional data transmit


# 0b759171 12-Aug-2009 kieranm <kieranm>

BUG27209: handle trimming of segments when out of window or out of
order properly


# fa2dbc2b 12-Aug-2009 kieranm <kieranm>

BUG27199: use snd_wl2 instead of snd_wl1


# 730a9389 28-Jul-2009 goldsimon <goldsimon>

Added debug print when rejecting incoming connections due to exceeded listen backlog


# c232edb8 25-Jun-2009 kieranm <kieranm>

BUG26301 and BUG26267: correct simultaneous close behaviour, and make
snd_nxt have the same meaning as in the RFCs.


# ac9e758f 06-May-2009 goldsimon <goldsimon>

Patch #6823: tcp_in.c - small optimization


# 12c50ed8 18-Apr-2009 goldsimon <goldsimon>

tcp_listen_input: format code for #if LWIP_TCP_TIMESTAMPS that calls tcp_enqueue like the other calls.


# f1a9f7ea 31-Mar-2009 kieranm <kieranm>

BUG20515: rework way TCP window updates are calculated and sent


# 4b146212 31-Mar-2009 kieranm <kieranm>

TASK9218: add support for TCP timestamp options


# baf30f5e 31-Mar-2009 kieranm <kieranm>

BUG20779: cope with SYN packets received during established states,
and retransmission of initial SYN.


# efac1098 26-Mar-2009 kieranm <kieranm>

BUG25622: handle return code of tcp_enqueue in tcp_listen_input()


# aa568727 19-Dec-2008 goldsimon <goldsimon>

patch #6699: fixed some warnings on platform where sizeof(int) == 2


# 299e2a70 18-Oct-2008 goldsimon <goldsimon>

fixed bug ##24596: Vulnerability on faulty TCP options length in tcp_parseopt


# 139944a3 24-Jun-2008 jifl <jifl>

* tcp_in.c: Fix for bug #23693 as suggested by Art R. Ensure cseg is unused
if tcp_seg_copy fails.


# 24e0b252 29-May-2008 kieranm <kieranm>

Remove redundant "if" statement, and use real rcv_wnd
rather than rcv_ann_wnd when deciding if packets are in-window.
Contributed by <arasmussen@consultant.datasys.swri.edu>


# aee9c4c8 26-Mar-2008 goldsimon <goldsimon>

fixed bug #22249: division by zero could occur if a remote host sent a zero mss as TCP option.


# f02c39a4 22-Jan-2008 fbernon <fbernon>

tcp.c, tcp_in.c, tcp.h, opt.h: Rename LWIP_CALCULATE_EFF_SEND_MSS in TCP_CALCULATE_EFF_SEND_MSS to have coherent TCP options names.


# 7518acf6 14-Jan-2008 fbernon <fbernon>

rawapi.txt, api_msg.c, tcp.c, tcp_in.c, tcp.h: changes for task #7675 "Enable to refuse data on a TCP_EVENT_RECV call". Important, behavior changes for the tcp_recv callback (see rawapi.txt).


# 32005617 04-Jan-2008 fbernon <fbernon>

rawapi.txt, api.h, api_lib.c, api_msg.h, api_msg.c, sockets.c, tcp.h, tcp.c, tcp_in.c, init.c, opt.h: rename backlog options with TCP_ prefix, limit the "backlog" parameter in an u8_t, 0 is interpreted as "smallest queue", add documentation in the rawapi.txt file.


# 99afb15c 31-Dec-2007 kieranm <kieranm>

Add persist timer


# 1ed34774 21-Dec-2007 goldsimon <goldsimon>

tcp.h, opt.h, api.h, api_msg.h, tcp.c, tcp_in.c, api_lib.c, api_msg.c, sockets.c, init.c: task #7252: Implement TCP listen backlog: Warning: raw API applications have to call 'tcp_accepted(pcb)' in their accept callback to keep accepting new connections.


# add48748 20-Dec-2007 kieranm <kieranm>

2007-12-20 Kieran Mansley (based on patch from Oleg Tyshev)
* tcp_in.c: fix bug# 21535 (nrtx not reset correctly in SYN_SENT stat)e


# 8cc32bc2 20-Dec-2007 kieranm <kieranm>

2007-12-20 Kieran Mansley (based on patch from Per-Henrik Lundbolm)
* tcp.c, tcp_in.c, tcp_out.c, tcp.h: fix bug #20199 (better handling
of silly window avoidance and prevent lwIP from shrinking the window)


# a3ef33c5 16-Dec-2007 goldsimon <goldsimon>

Removed debug code


# d2fa5c91 13-Dec-2007 goldsimon <goldsimon>

Fix bug #21699: segment leak in ooseq processing when last data packet was lost (free last segment if FIN is already received)


# 8d3d08e8 04-Dec-2007 goldsimon <goldsimon>

fix bug #21699 (segment leak in ooseq): add assert that all segment lists are empty in tcp_pcb_remove before setting pcb to CLOSED state; don't directly set CLOSED state from LAST_ACK in tcp_process


# f57c2424 26-Nov-2007 goldsimon <goldsimon>

Fixed bug #21582: pcb->acked accounting can be wrong when ACKs arrive out-of-order


# 95425552 21-Nov-2007 goldsimon <goldsimon>

Implemented calculating the effective send-mss based on the MTU of the netif used to send. Enabled by default. Disable by setting LWIP_CALCULATE_EFF_SEND_MSS to 0. This fixes bug #21535.


# 1faf0ab9 16-Nov-2007 goldsimon <goldsimon>

Moved inet files into ipv4/ipv6 directory; splitted inet.c/inet.h into inet and chksum part; changed includes in all lwIP files as appropriate


# 2d5908f4 01-Nov-2007 goldsimon <goldsimon>

Fixed bug #21494: The send mss (pcb->mss) is set to 536 (or TCP_MSS if that is smaller) as long as no MSS option is received from the remote host.


# 298d5cf0 01-Nov-2007 goldsimon <goldsimon>

Fixed bug #21491: The MSS option sent (with SYN) is now based on TCP_MSS instead of pcb->mss (on passive open now effectively sending our configured TCP_MSS instead of the one received).


# 85376595 01-Nov-2007 goldsimon <goldsimon>

Fixed bug #21181: On active open, the initial congestion window was calculated based on the configured TCP_MSS, not on the MSS option received with SYN+ACK.


# 7a99d730 28-Oct-2007 goldsimon <goldsimon>

Added some explaining comments.


# e3cd1ac1 07-Sep-2007 fbernon <fbernon>

Minor changes (but in lot of files): add #if/#endif for options where they could miss. #if LWIP_xxx if always put after #include "lwip/opt.h" (note this one indirectly include cc.h). Move others includes inside #if/#endif block.


# 4f76bc42 20-Aug-2007 fbernon <fbernon>

Rename pbuf's "flgs" in "flags" (see in [lwip-devel] Last changes by Marc)


# 2be12287 16-Aug-2007 fbernon <fbernon>

Minor changes (tabs, ident, coding style...)


# 42366990 16-Aug-2007 marcbou <marcbou>

Split pbuf flags in pbuf type and flgs.
Improved lwip_recvfrom(). TCP push now propagated.


# a6ca9aa3 16-Aug-2007 kieranm <kieranm>

* tcp_in.c: Fix for bug #19953 - correct TCP state machine when
* receiving FIN+ACK in SYN_RECV state


# 40ef2829 14-Aug-2007 fbernon <fbernon>

Minor change: add in tcp_in.c in tcp_input(), some calls to handle error statistics (stats & snmp)


# 9152d667 09-Aug-2007 fbernon <fbernon>

Comments Fix for Doxygen documentation


# fdc4c25e 01-Aug-2007 fbernon <fbernon>

Minor fix (warnings on unused args, wrong type, cast u32_t to u16_t...)


# 9eff9676 25-Jul-2007 goldsimon <goldsimon>

Fix bug #20506: Slow start / initial congestion window starts with 2 * mss (instead of 1 * mss previously) to comply with some newer RFCs and other stacks.


# a2dffd43 13-Jul-2007 fbernon <fbernon>

Fix minor patch #5741 build error...


# 4ac0580a 12-Jul-2007 kieranm <kieranm>

2007-07-13 Kieran Mansley
* src/core/tcp_in.c Apply patch#5741 from Oleg Tyshev to fix bug in
out of sequence processing of received packets


# fa4b7114 02-Jul-2007 goldsimon <goldsimon>

Added some ASSERTS and casts to prevent warnings when assigning to smaller types.


# 9abbb581 01-Jul-2007 goldsimon <goldsimon>

Changed tcp_pcb->snd_queuelen from u8_t to u16_t to prevent overflowing when sending many small packets with big send buffer, added assertions and oveflow checks for snd_queuelen.


# c9ebb895 18-Jun-2007 goldsimon <goldsimon>

Removed warning "empty body in an if statement" in tcp_receive() for LWIP_DEBUG=0


# e89f5983 17-Jun-2007 fbernon <fbernon>

tcp_in.c: Fix bug #20126 : Zero ssthresh bug (by Per-Henrik Lundblom and Kieran Mansley).


# 837cb426 08-Jun-2007 goldsimon <goldsimon>

Done some work on task #1549 (function documentation)


# 79be888b 12-Apr-2007 kieranm <kieranm>

* tcp.c, tcp_in.c, tcp_out.c, tcp.h: Modify way the retransmission
timer is reset to fix bug#19434, with help from Oleg Tyshev.


# 7294cb08 20-Mar-2007 kieranm <kieranm>

* Fix all uses of pbuf_header to check the return value. In some
cases just assert if it fails as I'm not sure how to fix them, but
this is no worse than before when they would carry on regardless
of the failure.


# 5c65d473 11-Mar-2007 fbernon <fbernon>

Keepalive values can be configured at run time with LWIP_TCP_KEEPALIVE, but don't change this unless you know what you're doing (default are RFC1122 compliant). Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set in seconds.

Old TCP_KEEPALIVE can always be used, and its only difference with TCP_KEEPIDLE is this last use seconds and not milliseconds with setsockopt.

Some documentation (not perfect, but...):

http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.commtechref/doc/commtrf2/setsockopt.htm


# cdb7557d 18-Aug-2006 christiaans <christiaans>

Added SNMP counters.


# 313743c8 07-Apr-2006 likewise <likewise>

Fix for out-of-sequence FIN handling, patch by Oleg Tychev.


# 6cb19d7e 07-Apr-2006 likewise <likewise>

Dangling inseg.p pointer fix by Pedro Alves.


# 0b3b7131 01-Mar-2006 likewise <likewise>

Removed 'even sndbuf' fix in TCP, this fix was a ugly hack for the incomplete checksum routine that does not work now that the checksum routine is fixed.


# 319a972e 14-Dec-2005 likewise <likewise>

Duplicate FIN ACK race condition fix by Kelvin Lawson.


# e1b215aa 24-Nov-2005 christiaans <christiaans>

Introduced cc.h formatters and removed SO_REUSE from transport layers.


# baf37767 08-Jun-2005 likewise <likewise>

2005-06-08 Leon Woestenberg <leon.woestenberg@gmx.net>
* tcp_in.c: Send reset on unexpected ACK in two cases. Fix submitted by olaf.peters@technolution.


# 533fc217 04-Feb-2005 likewise <likewise>

4 February 2004, Leon Woestenberg <leon.woestenberg@gmx.net>
tcp_in.c: Applied fix patch for bug #2679.
tcp_out.c: Applied fix patch for bug #2679.
http://savannah.nongnu.org/bugs/?func=detailitem&item_id=2679


# bb87d19e 24-Nov-2004 kieranm <kieranm>

Kieran Mansley - kjm25@cam.ac.uk - 24th Nov 2004
* Increase pcb->snd_buf by 1 when an ACK is received in SYN_SENT state to ensure correct operation


# 4cb8192c 20-Sep-2004 kieranm <kieranm>

Kieran Mansley - kjm25@cam.ac.uk - 20th September 2004
* Corrected "out by one" error on one of the TCP_SEQ_BETWEEN macro calls introduced recently


# 2ed5bc51 12-Sep-2004 kieranm <kieranm>

Kieran Mansley - kjm25@cam.ac.uk - 12th September 2004

Applied patch from Sam Jansen as detailed in
http://lists.gnu.org/archive/html/lwip-users/2004-07/msg00106.html
to correctly handle retransmission after a retransmission timeout


# e8715487 12-Sep-2004 kieranm <kieranm>

Fixed typo (missing "{") in previous checkin


# a3d27e30 12-Sep-2004 kieranm <kieranm>

Add TCP_SEQ_BETWEEN macro for comparing a range of sequence numbers


# b9ebcd77 17-Aug-2004 likewise <likewise>

Ingress TCP keep-alive with garbage byte support.


# c2abae53 25-Jul-2004 likewise <likewise>

pbuf_free() assert triggered by NULLified inseg.p. Reported by Karl Jeacle on 25-7-2004 on lwip-users.


# a6ab0405 14-Jul-2004 likewise <likewise>

Disabled some code by #if 0 #endif rather than /* */.


# c356f560 14-Jul-2004 kieranm <kieranm>

Kieran Mansley - 14th July 2004

* Fixed whitespace indenting in parts of tcp_in.c
* Changed adjustment of ssthresh in response to fast retransmit
* Commented out iteration of unsent list when new ACK received as we no longer put all unacked data on unsent list when retransmitting


# 450dd651 26-May-2004 kieranm <kieranm>

Kieran Mansley - kjm25@cam.ac.uk - 26th May 2004

* Fixed bug 9076 (changes to pbuf tot_len and seg dataptr when trimming front edge of a received packet)


# 8f309a3f 29-Apr-2004 likewise <likewise>

Clean-up source comment documentation for Doxygen.


# 2c8aa6f6 23-Mar-2004 kieranm <kieranm>

Kieran Mansley - kjm25@cam.ac.uk - 23rd March 2003
- Changed all #ifdef SO_REUSE into #if SO_REUSE


# 6f7c8fb3 22-Mar-2004 likewise <likewise>

Made #ifdef's into #if's for SO_REUSE.


# 82f852ab 11-Mar-2004 likewise <likewise>

Fix cyclic dependencies by careful re-ordering of #includes.
This is really nasty. Can we forward-declare pointers to structs?


# 10d42c6f 11-Mar-2004 likewise <likewise>

Replaced ip_addr_isbroadcast() macro by function.
Overrides patch #2679, as this must be solved inside ip_addr_isbroadcast(), inspired by BSD.


# f81c2744 23-Feb-2004 kieranm <kieranm>

23/02/2003 - Kieran Mansley - kieranm@gtemail.net
* Applied patch #2679

* Adds check to line 133 for NETIF_FLAG_BROADCAST


# 4bf33595 19-Feb-2004 lukem <lukem>

Added ability to disable checksum generation and checking at compile-time


# 7bfea6ed 16-Feb-2004 likewise <likewise>

Applied Ian Wienand's patches (4-2-2004). Was partly applied earlier.


# e1c4bfad 06-Feb-2004 likewise <likewise>

Merged from DEVEL, except for the API change in etharp.c.


# 1ed40e79 06-Feb-2004 likewise <likewise>

Applied alias.diff by Ian Wienand on lwip-devel on February 4th 2004.
Using union to make explicit either tcp_listen_pcb or tcp_pcb.


# 1b96391c 20-Jan-2004 likewise <likewise>

Merged from DEVEL to main. Two TCP fixes and two NULL reference fixes.


# a646b537 17-Nov-2003 likewise <likewise>

Merge from DEVEL. Assert used field not available without callback API.


# e4a6d199 14-Nov-2003 likewise <likewise>

Merged from DEVEL into main tree.


# 93dfcdce 11-Jun-2003 likewise <likewise>

Fixes wrongly cast LWIP_DEBUGF arguments (patch #1596 and more).


# 80145519 10-Jun-2003 kieranm <kieranm>

Changed DEBUGF to LWIP_DEBUGF


# df99ce9d 09-Jun-2003 likewise <likewise>

Replaced all tabs with two spaces (regardless of indentation is correct).


# 6719f100 27-May-2003 jani <jani>

put LWIP_MAX and LWIP_MIN macros in def.h and use these instead of locally declaring them in .c files


# cda867d5 18-May-2003 likewise <likewise>

Applied patches posted by Marc Boucher on lwip-users May 18th 2003.


# 03bc7c86 01-May-2003 likewise <likewise>

Major stylo search/replace for "One space between keyword and opening bracket."


# 7cb64f2a 01-May-2003 likewise <likewise>

Patch #1183 applied. This drops short UDP/TCP packets.


# 50f47f18 09-Apr-2003 davidhaas <davidhaas>

Fix memory leaks.

When pbufs are chained, the second pbuf must be freed, if no higher level
application refers to it any longer.


# 1a72feb1 01-Apr-2003 likewise <likewise>

etharp_query() has error return type now. Matched dhcp.c with this change.
Added debug messages in other places.


# fa34d51b 24-Mar-2003 likewise <likewise>

Added documentation and comments.


# 859f06a9 21-Mar-2003 jani <jani>

if LWIP_TCP is 0 do not link in TCP code.putting ugly ifdefs in api and core :(.Also only udp_init if LWIP_UDP is on


# 090b4087 16-Mar-2003 likewise <likewise>

Using a negated unsigned value as func. arg. fails for Keil C166 compilers.


# 18df3961 21-Feb-2003 jani <jani>

byte-order handling functions are in inet.c now and the uperrcase counterparts are gone. opt.h has all the
configurable items debug does not need to be directly included.


# dd2fa15e 06-Feb-2003 davidhaas <davidhaas>

Add the following features and bugfixes:

Added select() functionality to sockets library.
Support for errno in sockets library.
Byte ordering fixes.
basic lwip_ioctl(), FIONREAD, get/setsockopt() etc. support

- added additional argument to netif_add to pass state pointer so that the
if_init function has access to context information before
the interface is added, without accessing globals.

- added netif_remove()

- to conserve cpu load the tcpip_tcp_timer should only be active
when tcbs that need it exist.

- pass length of available data to callbacks for NETCONN_EVT_RCV events

- added tcpip_link_input(), a hack to allow processing of PPP
packets in tcpip_thread() context. This saves threads and context
switches.

- renamed incompatible ASSERT() macro to LWIP_ASSERT() to avoid name
collision.

- changed a bunch of %d's to %u's in format strings for unsigned values.

- added ip_frag to lwip_stats.

- changed IP_REASS_MAXAGE and IP_REASS_TMO defaults to more realistic
values.

- added sys_timeout_remove() function to cancel timeouts (needed by PPP
amongst other things).

- tolerate NULL returns from sys_arch_timeouts() since some threads might
not need to use or have timeouts.

- added sys_sem_wait_timeout()

- moved mem_malloc() function to end of mem.c to work around tasking
compiler bug.

- automatically bind to local tcp port if 0.

- allow customization of port ranges for automatic local bindings.

- corrected various typos, spelling errors, etc..

Thanks to Marc Boucher for many of these changes.


# 04985336 14-Jan-2003 jani <jani>

ack duplicate segments too to prevent connection hanging when a single transmitted ACK gets lost


# 1ad5537c 13-Jan-2003 likewise <likewise>

Fixed some typo's in the comments.


# 4a2d03a5 10-Jan-2003 jani <jani>

seqno is u32_t so use %lu instead of %ld when printing it


# cc4df710 08-Jan-2003 likewise <likewise>

Updated lwIP module copyright years to include 2003. Committers must check theirs.


# 156d2c86 19-Dec-2002 jani <jani>

sizeof(u8_t) is 1 at temperatures > 0 K


# ef683923 17-Dec-2002 jani <jani>

renamed (hopefully everywhere) stats to lwip_stats.closes bug #1901


# c0a8ef6f 17-Dec-2002 jani <jani>

Use C style comments.In debug stataments cast various struct pointers to void* to
avoid printf warnings.misc warnings in etharp.


# 6972e81a 03-Dec-2002 kieranm <kieranm>

Zero pcb->acked if ack does not acknowledge new data
- prevents the sent function being called multiple times when no new data has been acknowledged


# dfe1ab74 21-Nov-2002 likewise <likewise>

Added debug messages for corner cases of TCP states.


# 131eed41 13-Nov-2002 jani <jani>

Fix function names in DEBUGF stataments.Remove reference to "reclaimed" field in stat.


# 1f1e6eb5 13-Nov-2002 adamdunkels <adamdunkels>

Fixed a few C style issues to make it compatible with the rest of lwIP.


# 8b5fcad0 24-Oct-2002 kieranm <kieranm>

Added check on entire sequence number of received packet being less than the rcv_nxt variable.
(see http://www.sics.se/mailing-lists/lwip.html/msg01409.html)


# 4933bfaa 24-Oct-2002 kieranm <kieranm>

Fixed bug in duplicate ack handling
(see http://www.sics.se/mailing-lists/lwip.html/msg01460.html)
Solution adds check on right window edge when duplicate ack received, if it is different it is not a duplicate.


# 8fe9e007 24-Oct-2002 kieranm <kieranm>

Fixed congestion window bug where the pcb->cwnd variable overflowed when increased.


# 814f8c50 23-Oct-2002 adamdunkels <adamdunkels>

Updated TCP out-of-sequence handling to use recv_data variable instead of old pcb->recv_data.


# bcb26001 21-Oct-2002 likewise <likewise>

New file structure towards SLIP/PPP. Renamed tcp_*.c for 8.3 sake.
See lwip@sics.se Mon, 21 Oct 2002 magnus.ivarsson