Commit Graph

6070 Commits

Author SHA1 Message Date
Axel Lin
a51c92b617 tcp_out: Fix trivial build error
Fixes: 6ac21515ca ("Add missing null checks")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-06-14 22:47:28 +08:00
Matthias Hofmann
6ac21515ca Add missing null checks.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-14 16:20:47 +02:00
Simon Goldschmidt
e61b925709 try to fix compiling with gcc & clang 2018-06-14 15:01:57 +02:00
Simon Goldschmidt
944f286d87 fix bug in RA MTU validation
Also fix that RA could change IPv4 MTU.
See bug #53696

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-14 12:55:18 +02:00
Simon Goldschmidt
39faa8f61d added tests for ip6addr_ntoa_r 2018-06-14 12:30:14 +02:00
Simon Goldschmidt
313664c59c ip6addr_ntoa_r: correctly generate ipv4 mapped addresses 2018-06-14 12:29:40 +02:00
Axel Lin
7c03f4cf46 Silence lwip_tolower compiler warning
Fix gcc build warning: array subscript has type 'char' [-Wchar-subscripts].

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-06-14 09:47:19 +08:00
Simon Goldschmidt
b0e5eeb7d2 udp: prefer correctly bound pcbs when receiving broadcast
See bug #53301

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 22:01:18 +02:00
Simon Goldschmidt
1bdc669b45 udp: restructure udp_input uncon_pcb selection in preparation for fixing bug #53301 2018-06-13 21:59:04 +02:00
Simon Goldschmidt
47ebb2b267 dns: add a comment about case insensitivity 2018-06-13 15:10:47 +02:00
Simon Goldschmidt
a9d6ea5953 introduce 'lwip_tolower' and use it in dns.c
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 15:08:11 +02:00
armink
66f7f06601 fix DNS resolution to not case insensitivity
See patch #9654

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 15:04:46 +02:00
Matthias Hofmann
8e23b8d903 Correct UDP rebind check.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 15:00:21 +02:00
Simon Goldschmidt
a75332a407 ip4_frag: correctly refragment packets that already have MF set
see patch #9645

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 14:56:18 +02:00
Simon Goldschmidt
25497bb387 bridgeif/slipif/zepif: check that input callback is not NULL 2018-06-13 10:53:50 +02:00
Simon Goldschmidt
38614e4f3e unit tests: remove dummy netif input function
This partly reverts a26a2e13 after removing that NULL check again.

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 10:46:44 +02:00
Axel Lin
61e3f49f69 netif: Don't return error if pass NULL netif_input_fn to netif_add
The new NULL checking against netif_input_fn make ppp stop working
because in ppp_new() it calls netif_add with NULL netif_input_fn.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 10:39:38 +02:00
Simon Goldschmidt
3f2227f04c Fix pppos after changing PBUF_POOL to PBUF_RAM
This partly reverts 31bc2f9b which broke pppos tx as 'pppos_output_append'
implements a custom scheme of checking available pbuf size.
Added a comment why PBUF_POOL is ok for tx in this special case.
See bug #51908

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-13 09:38:04 +02:00
Simon Goldschmidt
392c676ef5 fix bug #53273: IPv6 link-local address generation for non-ethernet type netif does not convert byte order 2018-06-13 08:57:17 +02:00
Simon Goldschmidt
0c5133d7cf fix ip6addr_aton for non-shortened ipv4 mapped addresses 2018-06-12 21:48:32 +02:00
Simon Goldschmidt
eb91fdd861 httpd: fix missing null termination when searching for a default file in file system folder 2018-06-12 20:14:04 +02:00
Simon Goldschmidt
a26a2e1340 adapt unit tests to additional NULL checks 2018-06-12 13:47:13 +02:00
Simon Goldschmidt
1bf323e12f remove 2 NULL checks which are wrong 2018-06-12 13:46:44 +02:00
Simon Goldschmidt
e7c0619189 fix NULL checks (compiler error, tcp_rst allows pcb==NULL) 2018-06-12 13:32:12 +02:00
Simon Goldschmidt
31bc2f9b20 fixed bug #51908: PPPOS uses PBUF_POOL in transmit pathway
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-12 10:39:46 +02:00
Matthias Hofmann
342d0eadfb Add null pointer checks for TCP, UDP and netif
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-12 10:24:08 +02:00
Simon Goldschmidt
6ea2483546 ip4_canforward(): don't route multicast packets
Added LWIP_HOOK_IP4_CANFORWARD to still implement multicast routing.
See bug #52914

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-12 06:45:30 +02:00
Axel Lin
1fd145fbc9 Fix trivial copy-n-paste mistake in ip4_debug_print
Fixes: 288d3c2802 ("fixed bug #54006: Two compiler warnings on IAR when debug is enabled")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-06-12 11:36:05 +08:00
Simon Goldschmidt
2837bb310c fix ip6addr_aton handling IPv4-mapped addresses
... and added a unit test for it

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-11 22:21:31 +02:00
Simon Goldschmidt
288d3c2802 fixed bug #54006: Two compiler warnings on IAR when debug is enabled 2018-06-11 20:11:47 +02:00
Simon Goldschmidt
f8e7cccf21 add new ip6 tests to (c)make list files 2018-06-10 19:23:02 +02:00
Simon Goldschmidt
31e07f90bd send router solicitations every 4 seconds
See bug #53973

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-08 23:09:13 +02:00
Simon Goldschmidt
4fa33c17bc add reference to the RFC for the last commit... 2018-06-08 22:54:02 +02:00
Simon Goldschmidt
1a294622d0 ipv6 router solicitation: "ensure at least one solicitation is sent"
Fix the case where nd6_send_rs() fails: send one solicitation here,
not LWIP_ND6_MAX_MULTICAST_SOLICIT.

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-08 22:45:55 +02:00
Simon Goldschmidt
fd050b8a97 fix bug #53971 Lwip sends Router Solicitation on address changes
... and add a unit test for it.

Moved resetting netif->rs_count from all reports to link-up and netif-up only.
While at it, clean up the interface a bit so that netif->rs_count is touched
from nd6.c only.

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-08 22:18:50 +02:00
Simon Goldschmidt
d4845abac6 test_etharp: fix compiler warning 2018-06-08 20:03:51 +02:00
Simon Goldschmidt
ab922582dc docs: use ETH_HWADDR_LEN, not sizeof(netif->hwaddr) 2018-06-07 20:48:18 +02:00
Simon Goldschmidt
b1ffb3a8d3 Try to fix bug #53952 (ip4_addr_debug_print_val unaligned structure reference compiler warning) 2018-05-24 23:13:27 +02:00
Dirk Ziegelmeier
d996d0f486 Apply patch #9629: tftp_cleanup() should clean up more
By Jens Nielsen
2018-05-21 09:27:31 +02:00
Simon Goldschmidt
11c294e973 fix type conversion errors introduced with last commit 2018-05-17 22:35:12 +02:00
Simon Goldschmidt
0c2fdfcf42 Fix bug #53667: ARP table max size is to small
arp table functions, nd6 destination cache and struct netif_hint
can now be u16_t or u8_t depending on table size, so up to 32K
entries can be used in these tables (s16_t)

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-05-17 21:52:01 +02:00
Simon Goldschmidt
0f165ff136 etharp: use generic types in external access to ARP table
This should hide the internal type used for access to the ARP table
which currently is s8_t or u8_t, depending on the use case.

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-05-17 21:16:06 +02:00
goldsimon
8f3df7c862 tcp: fix const warning for LWIP_NETIF_HWADDRHINT==1 2018-05-17 20:57:02 +02:00
Axel Lin
ec8c764fcb apps/smtp: Fix build warning when !(SMTP_SUPPORT_AUTH_PLAIN || SMTP_SUPPORT_AUTH_LOGIN)
Fix build warning: ‘smtp_base64_encode’ declared ‘static’ but never defined.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-05-17 19:50:17 +08:00
Axel Lin
795f05c5d3 apps/smtp: Fix build warning when SMTP_CHECK_DATA==0
Fix build warning: 'smtp_verify' declared 'static' but never defined.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-05-17 17:06:31 +08:00
Joel Cunningham
ffaee59f3e loopif: only schedule poll when first packet is enqueued
This optimizes the netif_loop_output to only schedule a call to poll when
the first packet is enqueued. This ensures netif_poll is ran once per
burst of packets that are sent (which is typical in a TCP transfer)

The old behavior scheduled a call to poll for every packet that was
enqueued and this lead to exhaustion of the MEMP_TCPIP_MSG_API memory pool
and tcpip_mbox (if port is using static mbox size). The extra callbacks are
wasted work because netif_poll drains the entire queue when ran

This issue presented itself when large TCP transfer go across the loopback
netif
2018-05-02 09:16:01 -05:00
Joel Cunningham
070e449690 loopif: disable checksums
This disable checksum generation and checking for the loopback netif
when LWIP_CHECKSUM_CTRL_PER_NETIF is enabled

Checksums are not needed for the loopback adapter and this will increase
performance for loopback communication
2018-05-02 09:16:01 -05:00
goldsimon
a445172661 makefsdata: fix hiding local variable 'i' 2018-05-02 10:05:24 +02:00
Dirk Ziegelmeier
059bc952f6 Revert Filelists.mk to original state - it is not really useful to generate it from Filelists.cmake 2018-05-02 09:40:36 +02:00
Dirk Ziegelmeier
f116bc37d1 Cleanups in CMake files 2018-04-30 22:29:07 +02:00