goldsimon
035bf4dcb0
Fixed bug #50992 : window updated too often
2017-05-10 13:40:17 +02:00
Axel Lin
ae210967f2
apps/smtp: Fix memory leak if SMTP_BODYDH_MALLOC fails
...
Need to free s before return error.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-10 11:25:34 +02:00
Axel Lin
5bbe190b3b
apps/smtp: Make smtp_send_bodyh_data takes "const char **from" parameter
...
Fixes below build error:
cc -g -Wall -DLWIP_DEBUG -pedantic -Werror -Wparentheses -Wsequence-point -Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wc++-compat -Wwrite-strings -Wold-style-definition -Wcast-align -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address -Wunreachable-code -Wuninitialized -Wlogical-op -I. -I../../.. -I../../../../lwip/src/include -I../../../ports/unix/port/include -I../../../../mbedtls/include -Wno-redundant-decls -DLWIP_HAVE_MBEDTLS=1 -c ../../../../lwip/src/apps/smtp/smtp.c
../../../../lwip/src/apps/smtp/smtp.c: In function ‘smtp_send_body_data_handler’:
../../../../lwip/src/apps/smtp/smtp.c:1487:41: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
if((res = smtp_send_bodyh_data(pcb, (char **)&s->body, &s->body_len))
^
../../../../lwip/src/apps/smtp/smtp.c:1507:47: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
((res = smtp_send_bodyh_data(pcb, (char **)&s->body, &s->body_len)) == BDHALLDATASENT)
^
cc1: all warnings being treated as errors
../../Common.allports.mk:94: recipe for target 'smtp.o' failed
make: *** [smtp.o] Error 1
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-05-10 08:43:07 +02:00
Axel Lin
f5f34f138c
apps/smtp: Fix missing altcp conversion in smtp_send_bodyh_data
...
The pcb is "struct altcp_pcb *" so we cannot call tcp_sndbuf/tcp_write here.
Use altcp_sndbuf/altcp_write instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-10 08:18:00 +02:00
Axel Lin
b9d5399ec1
apps/smtp: Trivial typo fixes
...
s/smpt/smtp/g
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-10 08:06:49 +02:00
Joel Cunningham
c03fef9a3c
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
2017-05-09 09:01:03 -05:00
Axel Lin
d87b11e8f9
sockets: Remove unreachable break statements in event_callback
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-09 11:25:59 +02:00
Sylvain Rochet
4171f39a72
PPP: remove ppp_singlebuf
...
We don't have to keep a helper function just for the sake of a PBUF_RAW
constant. Inline ppp_singlebuf function.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2017-05-05 15:42:15 +02:00
Axel Lin
3e909bafa8
PPP: use pbuf_coalesce() instead of private ppp_singlebuf()
...
pbuf_coalesce() creates a single pbuf out of a chain of pbufs, which is
exactly what ppp_singlebuf() need.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2017-05-05 15:36:26 +02:00
Dirk Ziegelmeier
a942582b4b
Minor #ifdef cleanup in netif.c
2017-05-05 11:11:19 +02:00
Axel Lin
89d825f603
netif: Fix IPv6-only build
...
Fix below build error if LWIP_IPV4 == 0.
cc -g -Wall -DLWIP_DEBUG -pedantic -Werror -Wparentheses -Wsequence-point -Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wc++-compat -Wwrite-strings -Wold-style-definition -Wcast-align -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address -Wunreachable-code -Wuninitialized -Wlogical-op -I. -I../../.. -I../../../../lwip/src/include -I../../../ports/unix/port/include -I../../../../mbedtls/include -Wno-redundant-decls -DLWIP_HAVE_MBEDTLS=1 -c ../../../../lwip/src/core/netif.c
../../../../lwip/src/core/netif.c: In function ‘netif_add’:
../../../../lwip/src/core/netif.c:284:7: error: ‘ipaddr’ undeclared (first use in this function)
if (ipaddr == NULL) {
^~~~~~
../../../../lwip/src/core/netif.c:284:7: note: each undeclared identifier is reported only once for each function it appears in
../../../../lwip/src/core/netif.c:285:14: error: implicit declaration of function ‘ip_2_ip4’ [-Werror=implicit-function-declaration]
ipaddr = ip_2_ip4(IP4_ADDR_ANY);
^~~~~~~~
../../../../lwip/src/core/netif.c:285:5: error: nested extern declaration of ‘ip_2_ip4’ [-Werror=nested-externs]
ipaddr = ip_2_ip4(IP4_ADDR_ANY);
^~~~~~
../../../../lwip/src/core/netif.c:285:23: error: ‘IP4_ADDR_ANY’ undeclared (first use in this function)
ipaddr = ip_2_ip4(IP4_ADDR_ANY);
^~~~~~~~~~~~
../../../../lwip/src/core/netif.c:287:7: error: ‘netmask’ undeclared (first use in this function)
if (netmask == NULL) {
^~~~~~~
../../../../lwip/src/core/netif.c:290:7: error: ‘gw’ undeclared (first use in this function)
if (gw == NULL) {
^~
cc1: all warnings being treated as errors
../../Common.allports.mk:94: recipe for target 'netif.o' failed
make: *** [netif.o] Error 1
Fixes: 5967380c2034 ("netif_add: avoid passing NULL pointers to subsequent functions")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-05 10:39:15 +02:00
goldsimon
749e078d36
6lowpan: fix compiling with !LWIP_UDP
2017-05-05 09:19:02 +02:00
Dirk Ziegelmeier
5967380c20
netif_add: avoid passing NULL pointers to subsequent functions (reported by Axel Lin)
2017-05-05 09:07:40 +02:00
Axel Lin
9bbb741247
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>
2017-05-05 08:58:09 +02:00
goldsimon
d36306e30b
sntp_process: fixed unused variable if sub-second time info is not used
2017-05-04 15:49:12 +02:00
Axel Lin
bf510fee51
SNMP: Cleanup unreachable code
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-04 09:15:29 +02:00
Dirk Ziegelmeier
fe8c62e7b6
Fix bug #50932 : LWIP-provided byteorder functions defined in the wrong scope
...
Apply suggested fix from "Fayek"
2017-05-03 22:28:46 +02:00
goldsimon
72a8db7867
tcp_fasttmr: adapt comment (to delayed FIN implementation)
2017-05-03 21:42:59 +02:00
goldsimon
f00d7db409
backport of "variable assigned but not used" warnings from STM (why don't people report such things?)
2017-05-03 20:31:29 +02:00
goldsimon
eff97c04ef
backport of "unreachable code" warnings from STM (why don't people report such things?)
2017-05-03 20:30:38 +02:00
Dirk Ziegelmeier
6c236b047e
ip_route() can be called with IP_ANY_TYPE in src parameter, so remove code associated to that
2017-05-03 16:42:30 +02:00
Daniel Elstner
ccf10a5023
SNTP: Avoid warning if debugging is disabled
2017-05-03 16:40:11 +02:00
Joel Cunningham
ddf4e17411
tcp: indentation fix in tcp_receive()
...
TCP_OVERSIZE block was moved out from inside the while loop and thus
should be on column 7
2017-05-03 09:29:02 -05:00
goldsimon
4cf6f9ed51
tcp_free_acked_segments: fix debug printf parameter errors, fix unused parameters for !LWIP_DEBUG and/or LWIP_NOASSERT
2017-05-03 13:49:24 +02:00
goldsimon
778206798e
task #14433 : TCP: combine unsent/unacked queue loops in tcp_receive()
2017-05-03 12:32:01 +02:00
goldsimon
39316bb9de
httpd: fixed bug #50915 (HTTP_IS_DATA_VOLATILE was wrong for LWIP_HTTPD_DYNAMIC_FILE_READ==1)
2017-05-03 09:57:12 +02:00
goldsimon
b9c47c5089
tcp_route: add comment, fixed whitespace
2017-05-03 09:56:08 +02:00
goldsimon
5c0aab7bd5
udp SO_REUSE_RXTOALL: don't copy IP header in duplicated pbuf
2017-05-03 09:54:46 +02:00
Dirk Ziegelmeier
2b9a132772
Fix compile in tcp_route when IPv4 only is used and source-based routing is disabled
2017-05-03 09:09:37 +02:00
Dirk Ziegelmeier
d32492e953
Make patch 4 of David's Minix3 patches superfluous: Use PBUF_POOL to duplicate incoming packets in UDP
...
... which would have been the correct way to do it anyway :-)
http://git.minix3.org/index.cgi?p=minix.git;a=blob;f=minix/lib/liblwip/patches/0004-MINIX-3-only-avoid-large-contiguous-allocations.patch;h=f23143c7e8d372b3b35b599a97975d79924f73c1;hb=HEAD
2017-05-03 09:02:56 +02:00
goldsimon
7defe372b9
fixed compiling pbuf.c with LWIP_TCP==0
2017-05-03 09:02:06 +02:00
goldsimon
082fe71c0c
fixed compiling sockets.c with LWIP_UDP==0
2017-05-03 09:01:48 +02:00
Dirk Ziegelmeier
676dd74140
Minor cleanup and documentation updates
2017-05-03 08:51:00 +02:00
Dirk Ziegelmeier
e835707814
Cleanup and simplify tcp_connect() code
2017-05-03 08:46:06 +02:00
Dirk Ziegelmeier
5800cf51be
Work on task #14494 : Implement SO_BINDTODEVICE
...
TCP needs additional netif handling
2017-05-03 08:00:06 +02:00
Axel Lin
c144e5b1ec
pbuf_coalesce: Replace pbuf_alloc+pbuf_copy with pbuf_clone
...
Avoid duplicate the same implementation.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-05-02 20:36:00 +02:00
Axel Lin
bc0fafdeca
udp: Fix compiling for IPv6-only build
...
Fix below build error when LWIP_IPV6 && !LWIP_IPV4:
cc -g -Wall -DLWIP_DEBUG -pedantic -Werror -Wparentheses -Wsequence-point -Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wc++-compat -Wwrite-strings -Wold-style-definition -Wcast-align -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address -Wunreachable-code -Wuninitialized -Wlogical-op -I. -I../../.. -I../../../../lwip/src/include -I../../../ports/unix/port/include -I../../../../mbedtls/include -Wno-redundant-decls -DLWIP_HAVE_MBEDTLS=1 -c ../../../../lwip/src/core/udp.c
../../../../lwip/src/core/udp.c: In function ‘udp_input_local_match’:
../../../../lwip/src/core/udp.c:130:58: error: unused parameter ‘inp’ [-Werror=unused-parameter]
udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast)
^~~
Fixes: 13ffc86aeff3 ("Start working task #14494 : Implement SO_BINDTODEVICE")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-02 15:55:32 +02:00
Dirk Ziegelmeier
e3289116b9
Fix next build error introduced in my last commit
2017-05-02 15:21:52 +02:00
Dirk Ziegelmeier
6a754325dc
Fix build error introduced in my last commit
2017-05-02 14:53:18 +02:00
Dirk Ziegelmeier
c7e3519f46
Start working task #14494 : Implement SO_BINDTODEVICE
...
Implement setsockopt. TODO: getsockopt
2017-05-02 13:18:29 +02:00
Dirk Ziegelmeier
eab2ae5d78
Cleanup netif_name_to_index() implementation
2017-05-02 12:51:25 +02:00
goldsimon
0545eba002
Fixed copy&paste error found by travis-ci...
2017-05-02 10:42:59 +02:00
Dirk Ziegelmeier
13ffc86aef
Start working task #14494 : Implement SO_BINDTODEVICE
...
Implement binding TCP, UDP and RAW PCBs to a netif
2017-05-02 09:39:48 +02:00
Dirk Ziegelmeier
20fed63297
Add custom pbuf usage example to pbuf_alloced_custom() docs
2017-04-28 13:19:32 +02:00
Dirk Ziegelmeier
83d0607acf
Add PBUF_NEEDS_COPY macro to documentation
2017-04-27 19:25:19 +02:00
goldsimon
1add8c14ca
netif: tiny cleanup to last commit
2017-04-27 14:12:13 +02:00
goldsimon
975e29d76e
fixed copy&paste error :-)
2017-04-27 12:46:14 +02:00
Dirk Ziegelmeier
1aa24ee21b
Add new DHCP hooks to DHCP docs
2017-04-27 12:42:14 +02:00
Dirk Ziegelmeier
a09a8e4a06
Some documentation updates and fixes
...
Dedicated Zero-copy RX page
Fix doxygen warnings
2017-04-27 12:41:08 +02:00
goldsimon
6aac9377ee
Clean up LWIP_NETIF_HWADDRHINT a bit: create a struct holding the hint(s) and pass a pointer to that struct around. That way we are free to add more hints if required (e.g. see task #11620 )
2017-04-27 12:39:54 +02:00