Commit Graph

5585 Commits

Author SHA1 Message Date
goldsimon
866d6c8637 Make PBUF_LINK_ENCAPSULATION_HLEN default signed (unsigned would be OK, but too many defines are signed already and mixing them gets bad) 2017-07-06 20:26:24 +02:00
goldsimon
c730a404d4 Make ioctl(FIONBIO) take an int*, not a u32_t* to got the *nix way 2017-07-06 20:25:41 +02:00
goldsimon
b8ecfe640c work on -Wconversion... 2017-07-06 12:38:50 +02:00
goldsimon
2594f1a423 Try to fix the build: ip_globals.current_ip6_header cannot really be const :( 2017-07-06 11:50:02 +02:00
goldsimon
694fc7e472 work on -Wconversion... 2017-07-06 11:22:38 +02:00
goldsimon
9d61e36466 work on -Wconversion, fixed some const bug in ip4 2017-07-06 09:01:03 +02:00
goldsimon
44f7a3cb0d work on -Wconversion... 2017-07-05 22:31:58 +02:00
goldsimon
c5607d3889 Fix compiling ASSERT (broken some commits ago) 2017-07-05 12:22:02 +02:00
goldsimon
ba6b504cc0 work on -Wconversion... 2017-07-05 12:20:26 +02:00
goldsimon
9a40597ced work on -Wconversion... 2017-07-04 21:31:30 +02:00
goldsimon
debf34ff9c work on -Wconversion... 2017-07-04 21:26:30 +02:00
goldsimon
2b2fa0ed71 Ensure SACKs are deleted when pbuf_free_ooseq() frees ooseq pbufs (because of memory shortage) 2017-07-04 20:10:23 +02:00
goldsimon
0b91888eb1 remove invalid TODO comment 2017-07-04 20:09:41 +02:00
goldsimon
b1a90ad74a Added TCP SACKs to CHANGELOG 2017-07-04 20:09:15 +02:00
goldsimon
1a1c360f1d Fixed LWIP_TCP_SACK_VALID and its usage 2017-07-03 21:41:34 +02:00
goldsimon
6796bcf7ad Cleaned up a bit after merging SACK_OUT support (mostly coding style) 2017-07-03 21:20:56 +02:00
Jakub Schmidtke
b1a3c37c3c 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>
2017-07-03 20:17:30 +02:00
goldsimon
d262132b92 work on -Wconversion... 2017-07-03 20:15:02 +02:00
Dirk Ziegelmeier
94beb4eddf Make inet_chksum.c compile with -Wconversion 2017-06-30 22:17:32 +02:00
goldsimon
41177cfd1c work on -Wconversion... 2017-06-30 22:10:16 +02:00
goldsimon
c636072362 pbuf.c: work on -Wconversion... 2017-06-29 22:49:39 +02:00
goldsimon
5d10e1b6c3 test_pbuf: free pbufs at the end of tests 2017-06-29 20:44:14 +02:00
Axel Lin
ca9eae26e1 PPP, VJ: Use vj_uncompress_err at appropriate places
Use vj_uncompress_err() instead of duplicating the same code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2017-06-29 11:44:11 +02:00
Axel Lin
79f2200b27 PPP, PPPoS: Fix update SNMP ifoutoctets counter in pppos_output_last()
Current code does not correctly update ifoutoctets counter because nb->tot_len
is always 0. Fix it by setting nb->tot_len to actual payload length so we can
update ifoutoctets correctly.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2017-06-29 11:44:08 +02:00
goldsimon
5bddbdd914 tcp_output: faster return when nothing is to send (pcb->unsent == NULL) 2017-06-29 08:47:26 +02:00
goldsimon
48e55b1e5d tcp_output: slightly move the jump target 'output_done': when nothing is to send, pcb->unsent cannot be NULL; add a 2017-06-29 08:43:59 +02:00
Joel Cunningham
229c9edad2 tcp: switch tcpflags_t to u16_t for all cases (bug #51326)
This changes tcpflags_t to be a u16_t for all cases.  The TCP Appropriate
Byte Count support added a new flag that used a bit past 8 and since this
flag is now required, tcpflags_t can no longer be a u8_t

This does not increase the size of struct tcp_pcb due to padding that
already existed (see bug #51326 for details)

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-06-28 21:47:33 +02:00
goldsimon
092c6c1f07 DNS_MAX_SOURCE_PORTS is PP-checked to be <= 255... 2017-06-26 08:48:17 +02:00
goldsimon
5efe26ebd3 Fix the fix for LWIP_LOOPBACK_MAX_PBUFS :-) 2017-06-26 08:21:53 +02:00
goldsimon
5b15234833 work on -Wconversion... 2017-06-25 23:01:57 +02:00
goldsimon
197166d906 LWIP_LOOPBACK_MAX_PBUFS: fix compilation or memory leak for LWIP_LOOPBACK_MAX_PBUFS > 255 2017-06-25 20:31:09 +02:00
goldsimon
af0f4d4020 Start making the source compile correctly with gcc -Wconversion enabled 2017-06-23 21:15:36 +02:00
Matthias Hofmann
c12aa3fb40 Remove double definition of SNTP_SERVER_DNS.
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-06-23 21:05:30 +02:00
Dirk Ziegelmeier
d02a73c285 Replace usages of tcpip_callback_with_block(foo, bar, 0) with tcpip_try_callback() 2017-06-22 08:14:02 +02:00
goldsimon
b4921dc401 Ensure that all parts of an ip_addr are written for the various set commands when setting an ipv4 address in dual-stack configurations (for security & compiler warning reasons :) 2017-06-22 07:48:38 +02:00
goldsimon
c9e7e56389 Fix IPv4-only and IPv6-only after again last commits 2017-06-21 22:01:19 +02:00
goldsimon
48213650cd Try to make unit tests work without -Wno-address 2017-06-21 21:55:00 +02:00
goldsimon
c094fcc086 Try to make gcc work without -Wno-address 2017-06-21 16:07:36 +02:00
Dirk Ziegelmeier
10a5afeee7 Revert my last change to tcpip_callback() - it breaks the semantics of the function.
The function previously returned after posting a message, which is a short operation. Now it actually waits until the operation has completed - which may take a long time. This may break user programs. So all that remains is the cleanup separation in tcpip_callback() and tcpip_try_callback() :-(
2017-06-21 15:07:20 +02:00
Dirk Ziegelmeier
68d36f19f0 Implement LWIP core locking support in tcpip_callback_with_block()
Created two new functions for API cleanup:
tcpip_callback() that blocks until message is posted, cannot be called from IRQs.
tcpip_try_callback() that does not block and just tries to post a message. Can be called from IRQs.
Add compatibility #define tcpip_callback_with_block() that maps to these two functions according to "block" parameter.
2017-06-21 13:42:54 +02:00
goldsimon
79d69ce526 Slightly optimize pbuf_alloc: encode 'header offset' in 'enum pbuf_layer' instead of switch/case (which was duplicated in pbuf_alloc and pbuf_alloced_custom) 2017-06-21 13:37:05 +02:00
goldsimon
11da4ef024 Use ip_addr_debug_print_val instead of ip_addr_debug_print where applicable 2017-06-21 13:26:55 +02:00
Axel Lin
aa98747d6f timeouts: Trivial comment fix for cyclic_timer
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-06-21 13:11:48 +02:00
Joel Cunningham
d4c8a1ac78 netconn: switch gethostbyname to use tcpip_send_msg_wait_sem (task #14523)
This switches netconn_gethostbyname to use tcpip_send_msg_wait_sem to
take advantage of core locking support when enabled.

tcpip_send_msg_wait_sem handles blocking for the non-core locking case,
so we can remove the manual blocking in netconn_gethostbyname. For the
core locking case, we need to block if waiting on DNS callback. To
achieve this, we unlock the core and wait in lwip_netconn_do_gethostbyname.
This is the similar approach that netconn_write takes when it needs to
block to continue the write (see lwip_netconn_do_write)

This improves performance in the core locking case and is no change
for the non-core locking case
2017-06-20 17:52:28 -05:00
goldsimon
f13b1340f2 Refine comment changed by last commit 2017-06-20 20:53:39 +02:00
Jakub Schmidtke
112e370457 Sending TCP timestamp option in SYN packets
TCP timestamps were only sent if the remote side
requested it first. This enables the use of timestamps
for outgoing connections as well.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-06-20 20:51:50 +02:00
Axel Lin
faf74b36a4 PPP, VJ: Use pbuf_take instead of duplicate copy code
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-06-20 20:26:01 +02:00
goldsimon
fc23257ca0 Fix unused arg from last patch the *real* lwIP way ;-) 2017-06-20 20:13:31 +02:00
Dirk Ziegelmeier
b92bcc5f02 Fix unused arg from last patch the lwIP way 2017-06-19 14:11:35 +02:00
Our Air Quality
6e62b6090b Silence some unsed variable warnings. 2017-06-19 14:09:07 +02:00