Simon Goldschmidt
6229f9ef71
icmp_send_response: fix parameter order for LWIP_HOOK_IP4_ROUTE_SRC
2018-09-17 21:28:50 +02:00
Simon Goldschmidt
bc48eb512e
Fix bug #54506 (LWIP_CHECKSUM_ON_COPY causes wrong checksum (0xFFFF))
...
one's complement sum was not correctly done, which could result in the
checksum being 0xFFFF instead of 0 in some cases.
2018-09-12 21:56:16 +02:00
Simon Goldschmidt
93b2074f2b
Remove LWIP_DHCP_CHECK_LINK_UP define as it's useless
...
See bug #54574
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-09-07 21:01:32 +02:00
Dirk Ziegelmeier
24fc93e12f
Remove checks that the SO_* socket options and SOF_* lwIP-internal flags match
...
not needed any more since commit b0344518e82887057395f195fdf4d73384f15900
"sockets.c: Don't rely on #defines in socket.h to be in sync with ip.h
Map SO_* to SOF_* #defines"
Reported by Joan Lledó on mailinglist 6.Sep.2018
2018-09-07 10:01:59 +02:00
Dirk Ziegelmeier
dac4cb05f7
Fix bug #54569 : Compiler warning in ip4.c: unused parameter dest
2018-08-29 08:55:25 +02:00
Simon Goldschmidt
258cab1b22
fix bug #54315 (IPV6_V6ONLY socket accepts IPV4 connections)
...
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-07-23 21:47:33 +02:00
Dirk Ziegelmeier
eeb2218b3d
Revert "Test / RFC: Reformat a few files using clang-format"
...
This reverts commit 8b4a8159a898795ef0fc9226dae1ce66531ad487.
We do not want to do this shortly before a release. Reformatting (buggy reformatting) may introduce new bugs.
2018-07-18 08:34:01 +02:00
Dirk Ziegelmeier
0985e925a1
Fix bug #54327 : V2.1.0rc1 pbuf.c misses stdint.h include
...
... without reformatting the document (clang-format)
2018-07-18 07:31:47 +02:00
Dirk Ziegelmeier
cffb5cc087
Revert "Fix bug #54327 : V2.1.0rc1 pbuf.c misses stdint.h include"
...
This reverts commit 4e74421dac26f2646200b96d5f493982da522ef1.
2018-07-18 07:30:41 +02:00
Dirk Ziegelmeier
8b4a8159a8
Test / RFC: Reformat a few files using clang-format
...
Does it compile? Does it look good (enough)?
2018-07-17 21:15:48 +02:00
Dirk Ziegelmeier
4e74421dac
Fix bug #54327 : V2.1.0rc1 pbuf.c misses stdint.h include
2018-07-17 20:45:09 +02:00
Axel Lin
d3191e4835
dhcp6: Trivial comment typo fixes
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-07-12 21:35:38 +08:00
Jasper Verschueren
d65681a7d7
DHCP request send on reboot does not contain hostname option
...
When the network is changed, dhcp is rebooted.
It will send a dhcp request again to verify it's lease.
DHCP requests are send out in selecting state, rebinding, renewing
and rebooting. But in the rebooting state the hostname option is
not included. This means that after reboot, the hostname will be
unknown to the DNS.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-07-11 19:55:49 +02:00
Axel Lin
d73efd7d38
dhcp: Prevent NULL pointer dereference in dhcp_select
...
Move the code to make sure netif is not NULL before calling
netif_dhcp_data(netif).
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-07-05 21:39:00 +08:00
Simon Goldschmidt
596f742066
etharp: fix using ARP_TABLE_SIZE >= 0x80
2018-07-05 09:13:28 +02:00
Joel Cunningham
2bd1e313b9
etharp: cast netif_addr_idx_t to u16_t to match format type
...
This fixes an issue seen on MacOS with Clang 9.0.0:
../../../../lwip/src/core/ipv4/etharp.c:1069:142: error: format specifies type 'unsigned short' but the argument has type 'netif_addr_idx_t'
(aka 'unsigned char') [-Werror,-Wformat]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"U16_F"\n", (void *)q, i));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../../../lwip/src/core/ipv4/etharp.c:1074:120: error: format specifies type 'unsigned short' but the argument has type 'netif_addr_idx_t'
(aka 'unsigned char') [-Werror,-Wformat]
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"U16_F"\n", (void *)q, i));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
By default, netif_addr_idx_t is u8_t, so cast up to u16_t to match the format type
2018-07-04 16:11:46 -05:00
Simon Goldschmidt
fd0af07d2d
tcp/udp bind: small code restructuring for IPv6-only
...
See bug #54229
2018-07-02 20:31:38 +02:00
Simon Goldschmidt
1e24f9c9cd
dhcp: 2 small code improvements
...
See bugs #54226 and #54228
2018-07-02 20:27:12 +02:00
Simon Goldschmidt
19a929f5fb
dhcp: fix parse error with chained pbfus
...
If a chained pbuf starts with DHCP_OPTION_PAD, an overflow check
triggers and the packet is ignored.
Fix this by changing the way the offset is increased for PAD.
Also ignore a packet that is missing the END option.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-07-02 20:25:42 +02:00
Simon Goldschmidt
b1487e6480
ip4_reass: fixed duplicat NULL check
...
See bug #54197
Rerported-by: Andrey Vinogradov <andrey.vinogradov@teplomonitor.ru>
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-27 20:56:05 +02:00
Simon Goldschmidt
f3e14585ad
tcp_out: fix duplicate check of tcp snd_queuelen
...
Can be combined into a single check using LWIP_MIN.
See bug #54194
Reported-by: Andrey Vinogradov <andrey.vinogradov@teplomonitor.ru>
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-27 20:44:01 +02:00
Simon Goldschmidt
9992b48e90
fix compiling with LWIP_NOASSERT defined
...
See bug #54157
2018-06-20 20:56:20 +02:00
Simon Goldschmidt
824ebbe0e9
tcp: fix RTO timer not working if link is down
...
... and added some test cases for this situation
See bug #54139
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-19 22:48:06 +02:00
Simon Goldschmidt
3cdfc67dd8
ip4_frag: fix assertion on wrong pbuf
...
see bug #54117
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-19 21:29:16 +02:00
Simon Goldschmidt
7577e587be
lwip_itoa: fix implicit conversion warning
2018-06-18 12:15:37 +02:00
Simon Goldschmidt
dbc16e6765
minor whitespace cleanup
2018-06-15 21:19:19 +02:00
Axel Lin
a51c92b617
tcp_out: Fix trivial build error
...
Fixes: 6ac21515ca31 ("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
313664c59c
ip6addr_ntoa_r: correctly generate ipv4 mapped addresses
2018-06-14 12:29:40 +02: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
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
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
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
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: 288d3c2802e5 ("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
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