Dirk Ziegelmeier
4325aca0f7
Fix pbuf_memcmp() implementation by using pbuf_try_get_at() instead of pbuf_get_at(). Payload out-of-bounds access was not handled correctly.
2016-08-31 10:35:42 +02:00
sg
23147b0e21
added more out of range checks to dns_recv() (see bug #48924 )
2016-08-30 22:18:10 +02:00
sg
a08ed9148d
added pbuf_try_get_at() (much like pbuf_get_at() but can return out-of-pbuf error)
2016-08-30 21:35:37 +02:00
Dirk Ziegelmeier
8d45162a59
Fix usage of uninitialized data in dhcp.c by checking pbuf_copy_partial() return value
2016-08-30 21:33:43 +02:00
Dirk Ziegelmeier
2137f49d32
Fix usage of uninitialized data in nd6.c because of unchecked pbuf_copy_partial() return value
2016-08-30 21:20:58 +02:00
Dirk Ziegelmeier
aef3d2cb87
Minor coding style fix in pbuf.c
2016-08-30 21:09:24 +02:00
Dirk Ziegelmeier
840d1e60fa
Fix bug #48924 : Potential out of bound reads in DNS codes of lwip project by adding checks for pbuf_copy_partial() return values.
...
Add some comments to clarify handling of untrusted network data handling.
2016-08-30 21:09:24 +02:00
Axel Lin
198fa5dbfa
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>
2016-08-30 09:47:43 +02:00
Axel Lin
db6aa82a10
memp: Fix comment for memp_overflow_check_element_overflow/underflow
...
These functions now take desc rather than memp_type as second parameter.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-08-28 20:33:57 +02:00
Dirk Ziegelmeier
4b45baee10
Add some dual-stack notes to documentation
2016-08-26 15:58:18 +02:00
Dirk Ziegelmeier
0d510dd66d
Add API macros for netif client data handling and update documentation accordingly
2016-08-26 11:21:49 +02:00
Dirk Ziegelmeier
57468b8a30
Minor: Several documentation updates
2016-08-25 22:04:04 +02:00
goldsimon
89aa4e7d79
fixed bug #47921 : link-local prefix in router advertisement must not be processes for SLAAC (patch by abhishek ambure)
2016-08-25 14:21:30 +02:00
goldsimon
3e23eb764b
fixed compiling TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS (local variable 'p' was hidden)
2016-08-25 14:21:29 +02:00
Axel Lin
a2ca85a260
tcp: Make tcp_state_str/tcp_backoff/tcp_persist_backoff static
...
They are only referenced in tcp.c, so make them static.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-25 11:20:10 +02:00
sg
4c390ad39c
update netif address change triggers to tpc & udp to work with IPv6, too
2016-08-24 20:51:05 +02:00
Erik Ekman
a1db05c11e
Fix const argument warning in netif_ip6_addr_set
...
../../../../../lwip/src/netif/ppp/ppp.c:1276:37: error: passing
'const ip6_addr_t *' (aka 'const struct ip6_addr *') to parameter of type
'ip6_addr_t *' (aka 'struct ip6_addr *') discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
netif_ip6_addr_set(pcb->netif, 0, IP6_ADDR_ANY6);
^~~~~~~~~~~~~
../../../../../lwip/src/include/lwip/ip_addr.h:340:24: note: expanded from macro
'IP6_ADDR_ANY6'
^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../lwip/src/include/lwip/netif.h:436:73: note: passing argument to
parameter 'addr6' here
void netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, ip6_addr_t *addr6);
2016-08-24 14:41:48 +02:00
Axel Lin
bf5866b27d
tcp: Prevents a 0 sized (invalid) backlog
...
commit 44e1a2d8e2
accidently includes below changes in tcp_listen_with_backlog
- tcp_backlog_set(lpcb, backlog);
+ lpcb->backlog = backlog;
Thus pass 0 to the backlog parameter of netconn_listen_with_backlog() fails.
Fixes: 44e1a2d8e2
("define tcp_backlog_set() as dummy-define when backlog feature is disable")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-24 12:20:28 +02:00
goldsimon
298ec340e5
set netif IPv6 address & state via function to implement change triggers (task #13517 )
2016-08-24 09:19:53 +02:00
Dirk Ziegelmeier
8426dfa14d
Remove misleading comments from udp_send() and raw_send(). A pbuf may be added automatically in front of the chain to be able to send PBUF_REFs
2016-08-24 08:45:37 +02:00
Dirk Ziegelmeier
6fc7f84497
Minor: documentation updates
2016-08-24 08:19:51 +02:00
Dirk Ziegelmeier
c719c466b3
Remove SIZEOF_ETHARP_PACKET_TX #define, it is not needed any more after my last cleanups
2016-08-23 20:41:37 +02:00
Dirk Ziegelmeier
31778193da
Work on bug #48868 : Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_input() to use ethernet_output()
2016-08-23 17:23:21 +02:00
Dirk Ziegelmeier
6caa7b9927
Cleanup etharp_arp_input() signature to match the sig of other input functions (pbuf, netif). Rename to etharp_input()
2016-08-23 17:03:51 +02:00
Dirk Ziegelmeier
979bee386c
Work on bug #48868 : Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_raw() to use ethernet_output()
2016-08-23 16:58:17 +02:00
goldsimon
e4c74109cd
fixed bug #47652 : there is always a delay to send the first Neighbor Solicitation for the new add INCOMPLETE state neighbor entry
2016-08-23 15:50:48 +02:00
goldsimon
fd5b34ae43
ip4_forward(): fixed compiling IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1
2016-08-23 15:26:05 +02:00
goldsimon
306171c93b
DHCP: fixed compiling LWIP_DHCP_BOOTP_FILE==1
2016-08-23 15:25:39 +02:00
goldsimon
d99d91dae9
removed ETHARP_TRUST_IP_MAC since it is insecure and we don't need it any more after implementing unicast ARP renewal towards arp entry timeout
2016-08-23 13:00:15 +02:00
Dirk Ziegelmeier
4456c7d230
Fix regression in etharp.c: Allocate correct pbuf layer
2016-08-23 12:32:57 +02:00
Dirk Ziegelmeier
bae4d6398c
Fix some comments to reference ethernet_output now
2016-08-23 10:23:59 +02:00
Dirk Ziegelmeier
18136c047b
Work on bug #48824 : ethernet.c extensions: Implement ethernet_output();
...
Fixes bug #48862 : ethip6 does not support setting vlan
2016-08-23 10:15:03 +02:00
Axel Lin
1c5c96a50a
pbuf: Use SYS_ARCH_INC in pbuf_ref()
...
Use SYS_ARCH_INC to simplify the code.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-23 08:59:10 +02:00
Axel Lin
40f2bed5c4
mem: Simplify the code for try bigger pool in mem_malloc
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: sg <goldsimon@gmx.de>
2016-08-20 11:29:57 +02:00
Axel Lin
a032ccafe7
mem: Fix trivial comment typo about using custom pools
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-08-20 09:17:37 +02:00
goldsimon
4f4d16260f
minor: fixed typo
2016-08-19 15:40:36 +02:00
goldsimon
6b1e1af3d1
combine MAC filter actions for IGMP and MLD6 (IGMP has compatibility defines for old code, MLD6 filter functions must be adapted)
2016-08-19 13:54:14 +02:00
Axel Lin
b3bae1b44c
memp: Fix unused variable build error when MEMP_SANITY_REGION_BEFORE/AFTER is 0
...
MEMP_SANITY_REGION_BEFORE and MEMP_SANITY_REGION_AFTER can be overridden in
lwipopts.h, if one of it is set to 0 we got build error due to unused variable.
Fix unused variable build error when MEMP_OVERFLOW_CHECK >= 1 &&
(MEMP_SANITY_REGION_BEFORE == 0 || MEMP_SANITY_REGION_AFTER == 0).
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-19 13:47:37 +02:00
Dirk Ziegelmeier
5e36815867
init.c: Implement check for correct implementation of struct packing in lwip port
2016-08-19 13:05:51 +02:00
Dirk Ziegelmeier
6688033bc4
Move IGMP protocol struct to prot/igmp.h
2016-08-19 12:50:41 +02:00
goldsimon
ed566cceaa
minor cleaup in (eth)arp
2016-08-19 12:49:02 +02:00
goldsimon
55d05092ef
simplify memp.c code a bit
2016-08-19 12:25:48 +02:00
Axel Lin
0e9ef19cfb
memp: Remove memp_overflow_init() function
...
There is only one caller using memp_overflow_init(), and at that context
calling memp_overflow_init_element() actually simplifes the code.
Thus remove memp_overflow_init() function.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-08-19 12:25:47 +02:00
goldsimon
14fb48cd7a
minor: whitespace cleanups
2016-08-19 09:41:34 +02:00
goldsimon
9725a496b5
moved 2 enums from 'prot' headers to where they belong (dns, dhcp)
2016-08-19 09:41:33 +02:00
Dirk Ziegelmeier
8eb9db18a2
Reduce usage of netif/ethernet.h header, mostly lwip/prot/ethernet.h is sufficient
2016-08-19 08:36:00 +02:00
sg
43d6812b3e
IPv6 addr: clarify tentative count/LWIP_IPV6_DUP_DETECT_ATTEMPTS
2016-08-18 22:02:57 +02:00
Dirk Ziegelmeier
2d503f4433
Work on bug #48728 : headers should cleanly separate API vs. implementation
...
ICMP6
2016-08-18 20:52:00 +02:00
Dirk Ziegelmeier
81c68f529b
Work on bug #48728 : headers should cleanly separate API vs. implementation
...
MLD6
2016-08-18 20:36:44 +02:00
Dirk Ziegelmeier
8d68400387
Work on bug #48728 : headers should cleanly separate API vs. implementation
...
ND6
2016-08-18 20:28:03 +02:00
Axel Lin
e24fde05db
memp: Fix memp_overflow_check_element_overflow assertion
...
Use LWIP_MEM_ALIGN() in memp_overflow_init() to get alignment address for memp.
This fixes assertion in memp_overflow_check_element_overflow when
MEMP_OVERFLOW_CHECK is set.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-08-18 19:24:34 +02:00
Axel Lin
ef31afb921
memp: Fix build error when LWIP_HOOK_MEMP_AVAILABLE is defined
...
Fix below build error.
../../../../../lwip/src/core/memp.c: In function ‘memp_free’:
../../../../../lwip/src/core/memp.c:490:31: error: request for member ‘tab’ in something not a structure or union
old_first = memp_pools[type].tab;
^
../../Common.mk:94: recipe for target 'memp.o' failed
make: *** [memp.o] Error 1
Fixes: de9054cb7a
("memp: cleaned up MEMP_MEM_MALLOC")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-08-18 19:20:26 +02:00
Dirk Ziegelmeier
97fae7e41b
Code cleanup in autoip.c and dhcp.c
2016-08-18 12:49:59 +02:00
Dirk Ziegelmeier
7f60cb3889
Improve netif client data API for lwIP internal clients - these can use a compile-time constant to access their data now
2016-08-18 12:37:21 +02:00
Dirk Ziegelmeier
ebf7959880
Coding style fixes in netif.c
2016-08-18 11:44:19 +02:00
Dirk Ziegelmeier
0c7a59b5db
Minor: Documentation fixes
2016-08-18 11:06:50 +02:00
Dirk Ziegelmeier
c9ad58308a
Minor documentation fixes
2016-08-18 10:59:18 +02:00
Dirk Ziegelmeier
fa6a2d48cc
Fix DHCP unit test after my last changes
2016-08-18 06:09:02 +02:00
Dirk Ziegelmeier
c62bfd8146
Port AUTOIP to new netif client data API
2016-08-17 21:26:08 +02:00
Dirk Ziegelmeier
1db9631e7d
Port DHCP to new netif client data API
2016-08-17 21:04:44 +02:00
Dirk Ziegelmeier
c28fb298b7
Introduce an API to store arbitrary data pointers in struct netif
...
Let MDNS to use the new API
TODO: AutoIP, DHCP
2016-08-17 16:37:15 +02:00
Dirk Ziegelmeier
efb7b3d5f8
Rename LWIP_MDNS to LWIP_MDNS_RESPONDER
2016-08-17 12:07:38 +02:00
Dirk Ziegelmeier
c61c8f3766
Use udp_get_multicast_ttl/udp_set_multicast_ttl accessors where applicable
2016-08-16 08:08:06 +02:00
Erik Ekman
4919932c49
Apply patch #8755 : Multicast DNS responder support from Erik Ekman
2016-08-14 15:07:45 +02:00
Dirk Ziegelmeier
5493220c93
Move DNS protocol structs to separate header. Needed for Erik Ekman's MDNS implementation.
2016-08-13 09:05:28 +02:00
Dirk Ziegelmeier
6dcb2b2415
Work on bug #48730 : Enums should be used instead of multiple defines (where applicable)
2016-08-12 22:51:43 +02:00
goldsimon
dc7340bbd5
started with bug #48728 : move protocol definitions to 'include/prot/*.h' files (started with some IPv4 protocols)
2016-08-11 14:36:09 +02:00
goldsimon
bf3e8e6a48
minor coding style fixes in IPv6 code
2016-08-11 09:23:43 +02:00
Dirk Ziegelmeier
5c0944e01a
Don't document tcp_send_empty_ack and tcp_keepalive - users should never need them
2016-08-09 10:17:16 +02:00
Dirk Ziegelmeier
5a09fd3e35
Don't document ip4_route and ip6_route, users should use ip_route instead
2016-08-09 10:16:40 +02:00
Dirk Ziegelmeier
85ab39985a
Fix a few incorrect uses of err_t. Found by converting lwip error codes to an enum, but I'm not sure wether I want to commit the actual enum conversion.
2016-08-08 22:15:01 +02:00
Dirk Ziegelmeier
1631307bb3
tcp.c: Partly undo Simon's changes from today (repairs doxygen docs)
2016-08-08 21:42:27 +02:00
goldsimon
eba6ae0122
minor: add a comment about where to define LWIP_RAND()
2016-08-08 09:14:50 +02:00
goldsimon
219438fb24
cleanup: move stdlib.h include to mem.c, where it belongs
2016-08-08 09:11:24 +02:00
goldsimon
08378b7d4b
Improve LWIP_EVENT_API compilation
2016-08-08 08:49:14 +02:00
David van Moolenbroek
fc66fb830c
Fix compilation for LWIP_EVENT_API
...
Without LWIP_CALLBACK_API, is no error callback function pointer in
the TCP PCB, nor is it needed, so do not attempt to access it.
2016-08-08 08:48:28 +02:00
Dirk Ziegelmeier
f55c0e7864
Move rawapi.txt description to main page - this doc really should be found and read by users
2016-08-07 20:21:27 +02:00
Axel Lin
0a7db8a9a5
PPP: remove double include for lwip/sys.h
...
Including it once is enough.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-08-07 12:35:50 +02:00
Dirk Ziegelmeier
980a919c9a
Don't document IP type specific output functions, users should use IP type independent ones
2016-08-07 10:13:50 +02:00
Dirk Ziegelmeier
8d07629b71
Some documentation cleanups and include more comments that have been already in code into doxygen docs
2016-08-07 10:05:34 +02:00
Dirk Ziegelmeier
b94c8ee76f
Add some more functions and macros to documentation
2016-08-06 22:16:49 +02:00
Dirk Ziegelmeier
73131b1677
Fix doxygen warning in ip6.c
2016-08-06 20:29:35 +02:00
Dirk Ziegelmeier
87855b0e0e
Update doxgen docs: PBUF layers, IPv4 and IPv6 functions, add some missing tcp raw API functions
2016-08-06 20:28:49 +02:00
Dirk Ziegelmeier
70ee63ef3d
Documentation: Add example code for NO_SYS use case
2016-08-05 09:53:50 +02:00
sg
5f774270b6
minor: tabs -> spaces
2016-08-03 21:25:32 +02:00
David van Moolenbroek
02221cf5dc
Rename IP_HDRINCL to LWIP_IP_HDRINCL
...
In the BSD socket API world, IP_HDRINCL is a socket option for "raw"
sockets that indicates whether sent packets already include an IP
header. Within lwIP, "IP_HDRINCL" is redefined as a special value
that indicates to lwIP-internal functions that an IP header is already
included. While somewhat related, the two meanings are different and,
on platforms that define the IP_HDRINCL socket option, this results in
a conflict. This patch renames the lwIP one to "LWIP_IP_HDRINCL",
thus resolving the conflict.
2016-08-03 20:51:21 +02:00
Dirk Ziegelmeier
da83946e75
Add one more documentation sentence in tcp.c
2016-08-03 12:34:16 +02:00
goldsimon
3d379c97ec
IPv6 is NOT experimental any more :-)
2016-08-03 12:28:56 +02:00
goldsimon
018294d287
remove doubled include (tcpip.h)
2016-08-01 09:44:18 +02:00
Dirk Ziegelmeier
2f7e6d0661
Remove hard reference from netif.c to tcpip.c - avoids pulling in unnecessary code
2016-08-01 09:32:54 +02:00
Dirk Ziegelmeier
2c2d11fa4d
Update documentation of netif_input function
2016-07-30 10:40:36 +02:00
Dirk Ziegelmeier
4cb7e31d2d
Add missing #include in netif.c
2016-07-30 10:36:11 +02:00
Dirk Ziegelmeier
0c7d015ec4
Further improvement to netif input function autoselection: Select between netif_input() and tcpip_input() depending on NO_SYS setting
2016-07-30 10:29:14 +02:00
Dirk Ziegelmeier
4b67c582f6
Create netif_input function that decides according to netif flags where to pass an incoming packet.
...
Allow to pass a NULL pointer to netif_add() input function - if so, use the function mentioned above as input function.
2016-07-30 10:19:16 +02:00
sg
23cf45d252
d'oh! (fixed messed-up timeouts.h)
2016-07-27 21:48:29 +02:00
sg
53dc94d570
added LWIP_TIMERS_CUSTOM to override the default implementation of timeouts
2016-07-27 21:46:16 +02:00
sg
a326b057b3
Fix bug #48568 (timeouts does not support late firing properly) by assuming sys_check_timeouts() jitter can' be too bad
2016-07-27 21:17:15 +02:00
Dirk Ziegelmeier
70927892e1
Fix doxygen warning about debug parameters in memp.c
...
Remove documentation from them, it is not important
2016-07-27 20:34:23 +02:00
Dirk Ziegelmeier
31f941e172
More documentation updates
2016-07-27 20:34:23 +02:00
Dirk Ziegelmeier
0cb1d1144d
Integrate README file into doxygen docs instead of duplicating its content in main_page.h
2016-07-27 19:09:52 +02:00
Dirk Ziegelmeier
eb3261d6e0
Add some more TCP RAW API functions to documentation
2016-07-27 13:46:54 +02:00
Dirk Ziegelmeier
6c7eef7ac0
More documentation updates
2016-07-27 13:14:31 +02:00
Dirk Ziegelmeier
ef5c1b6590
Work on lwIP documentation
2016-07-27 13:09:33 +02:00
Dirk Ziegelmeier
ccc830c99c
Work on lwIP documentation
2016-07-27 13:03:36 +02:00
goldsimon
af97f9b239
fixed gcc compiler error in do_memp_free_pool(): obviously, SYS_ARCH_DECL_PROTECT() must be the last declaration...
2016-07-27 08:26:42 +02:00
Dirk Ziegelmeier
6b524367a3
Documentation review with Simon, minor changes
2016-07-27 08:05:38 +02:00
Dirk Ziegelmeier
c7e20150f0
Update and restructure docs of some lwip core functions
2016-07-26 19:42:16 +02:00
Dirk Ziegelmeier
c6831648e2
Document apps in doxygen module style, create more top-level categories to structure documentation
2016-07-26 19:30:05 +02:00
Dirk Ziegelmeier
8a9de94b1f
Restructure documentation. Create two top-level sections for thread-safe and callback-style APIs.
2016-07-26 18:39:53 +02:00
Dirk Ziegelmeier
67d674a59c
Document IGMP and MLD6 API in doxygen module style
2016-07-26 18:20:30 +02:00
Dirk Ziegelmeier
dc0859b8d1
Document DHCP and AUTOIP API in doxygen module style
2016-07-26 18:10:05 +02:00
Dirk Ziegelmeier
9c10daba93
Document netif API in doxygen module style
2016-07-26 17:53:07 +02:00
Dirk Ziegelmeier
0fea2bc02e
Document netconn API in doxygen module style
2016-07-26 17:40:55 +02:00
Dirk Ziegelmeier
ce19c59bb2
Document ip address function in doxygen module style
2016-07-26 17:11:01 +02:00
Dirk Ziegelmeier
8643782e5d
Document netif and lwIP in doxygen module style
2016-07-26 16:53:27 +02:00
Dirk Ziegelmeier
bd79f6c055
Document DNS, memory pools and PBUFs as modules
2016-07-26 16:40:13 +02:00
goldsimon
e030118750
moved MEM_LIBC_MALLOC code from mem.h to mem.c:
...
- it's not worth littering mem.h just to save some bytes to prevent the additional call;
- MEM_STATS now also work when MEM_LIBC_MALLOC is enabled
2016-07-26 15:02:36 +02:00
Dirk Ziegelmeier
59295be4ef
Some more RAW API documentation updates
...
Improve structure of documentation: PPP is now a module, too
2016-07-26 13:53:59 +02:00
Dirk Ziegelmeier
10acd8303d
Start to document public RAW API via doxygen
2016-07-26 13:38:43 +02:00
goldsimon
168ad22761
fixed custom pools after last memp cleanup
2016-07-26 12:26:52 +02:00
goldsimon
fb75f48751
Make lwip_cyclic_timers[] const
2016-07-26 09:08:29 +02:00
sg
00598b0b46
fix mem stats for MEM_USE_POOLS==1
2016-07-25 22:08:32 +02:00
Dirk Ziegelmeier
80be1a6bf8
Add links to new documentation pages in the relevant files
2016-07-25 08:20:39 +02:00
sg
de9054cb7a
memp: cleaned up MEMP_MEM_MALLOC:
...
- support memp stats when MEMP_MEM_MALLOC==1 (bug #48442 );
- hide MEMP_MEM_MALLOC in memp.c instead of messing up the header file;
- make MEMP_OVERFLOW_CHECK work when MEMP_MEM_MALLOC==1
2016-07-21 22:17:32 +02:00
sg
413eeef5fa
minor: moved sanity check from mem.c to init.c
2016-07-21 22:16:05 +02:00
goldsimon
523b11e664
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)
2016-07-21 13:47:52 +02:00
goldsimon
e8ffac852e
Fixed bug #48551 (autoip_supplied_address() does not work when address is first assigned); fixed AutoIP timeouts
2016-07-20 08:28:16 +02:00
sg
98d58ffd59
minor: fixed wrong indentation
2016-07-19 22:38:34 +02:00
sg
97b8e88e69
netif_set_addr(): when removing an address (setting address to ANY), we have to remove it *before* changing netmask/gw to ensure that tcp RST segment can be sent correctly
2016-07-19 22:34:22 +02:00
sg
24a339a609
autoip: made private things private, use etharp_* shortcuts instead of etharp_raw()
2016-07-19 22:27:20 +02:00
sg
86e419425b
minor: code layout only
2016-07-19 22:06:59 +02:00
sg
d0a79ff085
fixed bug #48477 (ARP input packet might update static entry)
2016-07-19 22:01:42 +02:00
sg
dff46e3816
Fixed bug #48539 (possible crash when packet received in SYN_SENT state)
2016-07-19 21:23:21 +02:00
goldsimon
579fffd2ec
fixed task #14084 : make dhcp_supplied_address() usable in netif change callbacks triggered by changing the netif address assigned by dhcp
2016-07-19 12:58:21 +02:00
Dirk Ziegelmeier
5d4c1432c2
Fix bug #48436 : Naming clash for timers.c (with FreeRTOS)
...
Rename timers.* to timeouts.*
2016-07-19 12:44:12 +02:00
goldsimon
6adeb706a6
change tcp_pcb->acked to be a global variable: used in one call stack only (idea by Ambroz Bizjak)
2016-07-19 10:38:01 +02:00
Dirk Ziegelmeier
72208cddfa
Rename ip_frag.* to ip4_frag.*
2016-07-19 10:12:56 +02:00
Dirk Ziegelmeier
7037b340c1
Move etharp to core/ipv4, which is a more appropriate place for it
2016-07-19 09:29:51 +02:00
Dirk Ziegelmeier
06c7404461
Fix bug #48510 , DHCP requires ARP
...
Use solution 2 proposed by Jens Nielsen
2016-07-19 09:10:21 +02:00
goldsimon
6c0d78caaa
Fixed trying to send RST for unconnected (but bound) pcb
2016-07-19 09:05:48 +02:00
Dirk Ziegelmeier
4ec3d29168
Fix bug #48504 : tcp_debug_print_pcbs reads nonexisting tcp_pcb fields
2016-07-19 08:54:44 +02:00
Dirk Ziegelmeier
4ea1d62d45
Update some doxygen comments
2016-07-16 17:56:29 +02:00
sg
421dab87e8
fixed bug #48476 (TCP sent callback called wrongly due to picking up old pcb->acked
2016-07-11 21:43:39 +02:00
Dirk Ziegelmeier
01e5d6d819
memp.c: No need to init variables located in BSS section
2016-07-08 11:44:28 +02:00
Ambroz Bizjak
18c332ae51
fixed bug #48402 (Bug in skipping over TCP options)
...
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-07-08 11:27:50 +02:00
goldsimon
6293a835e9
fixed compiling: forgot to move one line :-(
2016-07-08 10:16:46 +02:00
goldsimon
2df636fe77
memp: fixed STATS initialization
2016-07-08 10:06:36 +02:00
goldsimon
959042aa88
memp: fixed compiling various combinations of memp stats (display etc.)
2016-07-08 08:21:57 +02:00
Dirk Ziegelmeier
087ecab891
Add some comments to places where we cast through a void* to get rid of alignment warnings
2016-07-07 21:56:43 +02:00
Dirk Ziegelmeier
212eacd9d6
Fix bug #48356 : private memp pools have no statistic counters
...
Implement struct stats_mem instance for each pool, let lwip_stats.mem[] point to these instances
2016-07-07 21:55:51 +02:00
Dirk Ziegelmeier
b91e47b518
Implement portable and overridable allocation of memory buffers
...
Fixes bug #48300 (Private mempools allocate foreign memory), bug #48354 (Portable alignment defines/include required for static allocation) and bug #47092 (Tag memory buffers like memp_memory_xxx and ram_heap with a macro so that attributes can be attached to their definitions)
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2016-07-07 13:35:13 +02:00
goldsimon
811b237bd7
dns: fixed declaration and usage of DNS_LOOKUP_LOCAL_EXTERN()
2016-07-07 13:02:47 +02:00
goldsimon
14ca418ac0
minor: coding style fixes
2016-07-05 07:36:51 +02:00
goldsimon
2fdea8b79b
fixed bug #48398 (dns: entries reused during found-callback could be aborted if ttl==0)
2016-07-04 13:55:20 +02:00
Michael Brown
2e26fc9224
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>
2016-07-04 12:25:22 +02:00
goldsimon
fd83f4fb22
Fix bug #48359 (dns entries are not set to state DONE)
2016-07-04 10:22:20 +02:00
Sylvain Rochet
9d0546839c
init: fix NO_SYS targets build
...
lwip/src/core/init.c:256:32: error: "LWIP_COMPAT_MUTEX" is not defined [-Werror=undef]
#if LWIP_TCPIP_CORE_LOCKING && LWIP_COMPAT_MUTEX && !defined(LWIP_COMPAT_MUTEX_ALLOWED)
^
Setting LWIP_TCPIP_CORE_LOCKING is meaningless for NO_SYS targets,
therefore checking if LWIP_COMPAT_MUTEX is set does not make sense.
Introduced by 42dfa71f97
: Make LWIP_TCPIP_CORE_LOCKING==1 the default
(and warn if LWIP_COMPAT_MUTEX==1 in that case as mutexes are required
to prevent priority inversion on tcpip_thread operations)
2016-07-02 21:53:24 +02:00
sg
42dfa71f97
Make LWIP_TCPIP_CORE_LOCKING==1 the default (and warn if LWIP_COMPAT_MUTEX==1 in that case as mutexes are required to prevent priority inversion on tcpip_thread operations)
2016-06-30 22:37:37 +02:00
goldsimon
e6bc591a1e
fixed bug #48170 (Vulnerable to TCP RST spoofing) (original patch by Fabian Koch)
2016-06-30 08:50:42 +02:00
goldsimon
d31d2ee882
Revert "fixed bug #48170 (patch by Fabian Koch)"
...
This reverts commit 236bc19422
.
The fix introduced bug #48328 -> reverted
2016-06-30 08:41:50 +02:00
Erik Ekman
4047702928
Fix clang warning about unreachable code
...
Do check with preprocessor instead
2016-06-27 22:32:18 +02:00
Dirk Ziegelmeier
5d356c96f5
Minor: cleanup my last commit
2016-06-27 20:57:22 +02:00
Dirk Ziegelmeier
39545d2c6d
Fix clang warning about unreachable code
2016-06-27 20:56:21 +02:00
goldsimon
236bc19422
fixed bug #48170 (patch by Fabian Koch)
2016-06-27 10:31:36 +02:00
Dirk Ziegelmeier
38c0255fa2
Fix a few more CLANG format string warnings (from unix check project)
2016-06-25 13:24:48 +02:00
Dirk Ziegelmeier
102f5882d5
Fix several CLANG format string warnings
2016-06-25 13:06:31 +02:00
Dirk Ziegelmeier
8dc77ef558
doxygen updates - include IPv6 in documentation. Exclude include/netif/ppp/polarssl.
...
Convert TODO -> @todo
2016-06-22 20:18:23 +02:00
Sylvain Rochet
cfe5182380
timers: fix wrong timings for !NO_SYS targets
...
issue 1:
sys_arch_sem_wait() is supposed to return an elapsed time in ms, what could
happen given a > 1 kHz calling rate for high throughput systems is that it
might always returns 0 ms. This is a problem for systems which compute the
elapsed time from a high precision clock source.
This is what is currently happening in the unix port in sys_arch_sem_wait():
start time -> 1000000000; // ns
-- less than a ms before an event arrive --
end time -> 1000xxxxxx; // ns
return value -> (end time - start time)/1000000 -> 0
The return value is used to reduce the next timer interval, if
sys_arch_sem_wait() always return 0 no more timers are fired anymore
issue 2:
The current timer implementation for !NO_SYS targets only count elapsed
time while -waiting- for semaphore and doesn't count at all the time
spent by the stack to process packets. For CPU bound traffic patterns no
more timers are fired anymore.
Both are serious design issues which cannot be easily fixed without reworking
everything. This patch uses the properly implemented timers for NO_SYS targets
for !NO_SYS targets and merge them both into one single timers implementation.
2016-06-20 16:17:55 +02:00
goldsimon
6d95a34971
icmp ping response: fix invalid checksum (and possible assertion failure) when ip header contains options (is it correct that we mirror back all options)
2016-06-17 10:07:49 +02:00
goldsimon
61e067b98a
Check for minimum IPv4 header length in rx packets
2016-06-17 09:36:14 +02:00
goldsimon
fda778f6b6
ip6_reass: don't crash if frag header isn't the first (or not in the first pbuf)
2016-06-16 13:51:38 +02:00
Erik Ekman
d98e25a783
nd6: Handle incorrect ICMP option length in RA
...
Make sure ICMPv6 options have a valid length before
parsing them.
Found with afl-fuzz.
2016-06-14 15:06:49 +02:00
sg
4e241fbf14
some minor improvements to the tcp options checking code
2016-06-13 20:41:58 +02:00
Henrik Persson
b9a2ee8aaa
[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>
2016-06-13 20:08:43 +02:00
Dirk Ziegelmeier
5e7b343d52
Fix dns_getserver to return a pointer, not a value
2016-06-13 09:00:46 +02:00
Dirk Ziegelmeier
6be7e221a5
Fix a few doxygen warnings
2016-05-24 22:29:18 +02:00
sg
631c458c55
Fixed invalid DEBUGF level SERIOUS when pbuf_header fails (it returns '1': this is not serious!)
2016-05-23 22:06:02 +02:00
Dirk Ziegelmeier
90a656ed78
Fix several doxygen errors all over the code
2016-05-23 21:18:16 +02:00
Jan Breuer
ebd103775d
ipv6_addr: Render last zero in ip6addr_ntoa_r if not in first empty block
2016-05-23 09:54:54 +02:00
goldsimon
bd177ff38f
added comment, fixed coding style
2016-05-23 09:47:14 +02:00
Jan Breuer
ac21a5f370
nd6: add cleanup function
2016-05-23 09:44:27 +02:00
Axel Lin
8c0f620d83
dns: Use LWIP_ARRAYSIZE instead of open coded
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-05-11 12:20:15 +02:00
Axel Lin
7e9377a9c7
dhcp: Use LWIP_ARRAYSIZE to get the number of array entries
...
dhcp_discover_request_options is u8_t array, so the result is the same.
But use LWIP_ARRAYSIZE to get the number of array entries is better
because it works for all types.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-05-11 12:15:12 +02:00
Sylvain Rochet
1dcd5d31d7
pbuf: fix undefined PBUF_POOL_FREE_OOSEQ if TCP_QUEUE_OOSEQ is disabled
...
lwip/src/core/timers.c: In function ‘sys_check_timeouts’:
lwip/src/core/timers.c:328:5: error: "PBUF_POOL_FREE_OOSEQ" is not defined [-Werror=undef]
#if PBUF_POOL_FREE_OOSEQ
Fix it by declaring an empty PBUF_CHECK_FREE_OOSEQ() function if feature is
not enabled.
2016-05-08 03:09:51 +02:00
Dirk Ziegelmeier
49badf39a1
Fix bug #47805 : dhcp_recv can dereference NULL pointer
2016-04-29 11:16:33 +02:00
Dirk Ziegelmeier
2e05856f90
Fix bug #47641 : lwIP would accept IPv6 source addresses from the network that are mapped IPv4 adresses
2016-04-27 21:35:34 +02:00
goldsimon
c981b726f8
fixed bug #47601 (wrong NS request at DAD)
2016-04-27 10:19:13 +02:00
goldsimon
afd9ee9147
fixed bug #47743 (Closing listening tcp pcb is not posible without assert)
2016-04-26 13:27:17 +02:00
Dirk Ziegelmeier
bb908366a5
More PPP cleanups
2016-04-25 20:08:29 +02:00
Dirk Ziegelmeier
73d8f14ebd
Fix compile when PPP is not enabled
2016-04-25 20:08:29 +02:00
Dirk Ziegelmeier
ffa340a68c
task #13907 : PPP cleanups: Move PPP mempools out of lwIP core to PPP code
2016-04-25 20:08:29 +02:00
Dirk Ziegelmeier
4d1a2e6699
Fix projects without PPP do not compile any more
2016-04-22 06:24:01 +02:00
Sylvain Rochet
15fbfb7363
PPP, remove useless ppp_init function
...
Simon says:
ppp_init() does not seem to be used. The only thing it does is calling
magic_init(), which is not required because it its called again later
from ppp_input().
Also, the time from startup is rather constant, so calling sys_jiffies()
from ppp_init() does not create a random number.
2016-04-21 23:25:48 +02:00
Joel Cunningham
8ac1b4825a
udp: use netif addr as src for multicast sockets
...
Sockets bound to a multicast address could not transmit multicast
packets because the pcb local address did not match the netif address
even if the outgoing netif was resolved correctly.
To correct the issue, pcbs with a multicast local address will use
the outgoing netif address as the source address in IPv4.
2016-04-18 16:36:13 -04:00
Dirk Ziegelmeier
309e072238
Create new IP_IS_V4 macros and use them at instead of !IP_IS_V6 - since we now have an IPADDR_ANY_TYPE, just checking for !V6 does not mean it is V4
2016-04-06 22:31:31 +02:00
sg
ca1b8288de
prepare for overriding current timeout implementation: all stack-internal caclic timers are avaliable in the lwip_cyclic_timers array
2016-04-05 23:01:57 +02:00
sg
8c7f513f4d
patch #8358 : allow more combinations of listening PCB for IPv6
2016-04-05 22:04:19 +02:00
sg
0731eda0b3
make autoip_supplied_address() take a const pointer, too
2016-04-05 20:38:11 +02:00
Dirk Ziegelmeier
12a4cae404
Apply [patch #8969 ] from Freddie Chopin: Constify netif in dhcp_supplied_address()
2016-04-05 13:18:27 +02:00
sg
27f03798b9
Fixed possible problems with tcp_backlog_delayed/tcp_backlog_accepted
2016-03-25 16:19:39 +01:00