Commit Graph

6096 Commits

Author SHA1 Message Date
Mike Kleshov
84fcd6290e [patch #9548] Add .json to list of SSI file extensions
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-01-22 19:49:10 +01:00
Mike Kleshov
76826c1622 [patch #9547] Bring some comments in httpd.h up to date
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-01-22 19:47:16 +01:00
goldsimon
9dbfa9ca0a lwiperf: enable TCP over IPv6 connections
tested against iperf 2.0.10
redefine LWIPERF_SERVER_IP_TYPE if you don't want both IP versions
2018-01-19 21:08:51 +01:00
goldsimon
a696b2b515 lwiperf: fix testing against iperf 2.0.10 (bug #52901) 2018-01-17 20:54:16 +01:00
goldsimon
a7a8d9273c sockets_stresstest: replace printf with LWIP_DEBUGF, fix unused arg 2018-01-17 19:46:32 +01:00
goldsimon
9cf6bbf573 memp_std.h: make MEMP_PBUF a normal pool
No need to use LWIP_PBUF_MEMPOOL here since this pool never contains
pbufs with payload included.
2018-01-17 12:54:00 +01:00
goldsimon
2fd2b6810e memp_std.h: fix LWIP_PBUF_MEMPOOL element size for MEMP_OVERFLOW_CHECK
The LWIP_PBUF_MEMPOOL define used MEMP_ALIGN_SIZE instead of
LWIP_MEM_ALIGN_SIZE to calculate the element size of PBUF_POOL pbufs.
This is wrong for MEMP_OVERFLOW_CHECK, since MEMP_ALIGN_SIZE adds
MEMP_SANITY_REGION_AFTER_ALIGNED. This should be only added during
pool_base buffer allocation but for PBUF_POOL, it changed the size
of the pool elements.
2018-01-17 12:51:49 +01:00
goldsimon
d12d6abae8 minor whitespace/indentation cleanup 2018-01-17 12:27:17 +01:00
Joel Cunningham
f3c289d966 sockets: add core lock assert to select_check_waiters
Assert the requirement that the core is locked in select_check_waiters
2018-01-16 18:52:45 -06:00
goldsimon
8a27408eb2 altcp_tls_mbedtls: hide allocation strategy in altcp_tls_create_config() 2018-01-16 21:41:44 +01:00
David Girault
42f14a96fb altcp_tls: avoid use of static in altcp_tls_config
cert and pkey are allocated with the altcp_tls_config structure.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-01-16 21:03:43 +01:00
David Girault
c7106cc57f altcp_tls: fix pbuf leaked when handshake failed
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-01-16 20:56:15 +01:00
goldsimon
30ddfe1a98 Make LWIP_VERSION work with the preprocessor again. 2018-01-16 20:37:10 +01:00
Dirk Ziegelmeier
51369854b5 Fix bug #52911: SNMPv3 time window check is not the same as RFC3414 2018-01-16 13:30:31 +01:00
Dirk Ziegelmeier
72fc4a6ca5 Documentation - "Common pitfalls": Add some words about buffer alignment 2018-01-16 10:59:42 +01:00
goldsimon
2fd83c9d2e lwiperf: fix double-free of pbufs on recv error 2018-01-16 06:54:28 +01:00
Dirk Ziegelmeier
330793d94d Fix bug #52880: ethernet_output() Compile error. 2018-01-14 09:24:41 +01:00
goldsimon
28c8693683 mqtt: fix documentation error (remove ':' after param name) 2018-01-13 16:09:17 +01:00
goldsimon
f343a67b40 netif unit test: add some more tests for ext callbacks 2018-01-13 15:22:09 +01:00
goldsimon
e645d00484 netif unit test: fix -Werror=c++-compat 2018-01-13 15:16:12 +01:00
goldsimon
4a99721751 netif: try to fix gcc error (-Werror=c++-compat) 2018-01-13 09:38:18 +01:00
goldsimon
734b6ab57a netif: ensure netif_set_addr() only results in one "ext_status_callback"
This can be used e.g. in mdns to create one, not multiple "changed" triggers
if IP address and netmask change at the same time.
2018-01-12 23:11:38 +01:00
goldsimon
fa75ffed9d unit tests: added test_netif (checking ext_callbacks only, for now) 2018-01-12 22:27:15 +01:00
goldsimon
452c6a5378 netif: add netif_remove_ext_callback() (counterpart to netif_add_ext_callback()) 2018-01-12 22:25:34 +01:00
goldsimon
d115b28057 netif: change netif_nsc_reason_t to flags (preparation only) 2018-01-12 22:24:45 +01:00
goldsimon
0b2b22338a tcpip_thread_poll_one: remove invalid comment in this function 2018-01-12 20:41:11 +01:00
goldsimon
eb51b683ed fix copy & paste error in comment 2018-01-12 20:29:12 +01:00
Dirk Ziegelmeier
94ad523357 Update lwip.Doxyfile to doxygen 1.8.13 2018-01-12 15:01:14 +01:00
Dirk Ziegelmeier
46cb0a796b Forgot to add LWIP_ASSERT_CORE_LOCKED() to http_continue function 2018-01-12 13:35:20 +01:00
Dirk Ziegelmeier
653313cb37 Work on task #14780: Add debug helper asserts to ensure threading/locking requirements are met
Add LWIP_ASSERT_CORE_LOCKED() to several more places
2018-01-12 13:15:36 +01:00
Dirk Ziegelmeier
67ad6e45db Add assertion that checks for a maximum msecs value for sys_timeout() 2018-01-12 12:38:25 +01:00
Dirk Ziegelmeier
990c25d4f3 Add unit test for a long running timer 2018-01-12 12:37:16 +01:00
David Girault
6ccd12b97c altcp_mbedtls: added altcp_mbedtls_sndbuf implementation
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-01-11 10:34:55 +01:00
goldsimon
eab1b45cba tcpip: give the tcpip_thread mbox a better name
This also fixes shadowing 'mbox' in tcpip_timeouts_mbox_fetch()
2018-01-11 09:56:43 +01:00
Dirk Ziegelmeier
b6b14438b7 Rename lwip_sys_timers_get_next_timout() to sys_timeouts_get_next_timeout() 2018-01-11 09:53:07 +01:00
goldsimon
c257b56a39 move sys_timeouts_mbox_fetch() to tcpip_timeouts_mbox_fetch()
This cleans up the code: sys_timeouts_mbox_fetch() was only used from
tcpip.c anyway, so let's move it there.

Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-01-11 09:39:36 +01:00
Axel Lin
39ada6ec0e ip_addr: Define ip_addr_cmp_zoneless for LWIP_IPV6 only
This fixes build error when LWIP_IPV4=0 && LWIP_IPV6=1:
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 -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/mdns/mdns.c
../../../../lwip/src/apps/mdns/mdns.c: In function ‘mdns_recv’:
../../../../lwip/src/apps/mdns/mdns.c:1817:10: error: implicit declaration of function ‘ip_addr_cmp_zoneless’; did you mean ‘ip6_addr_cmp_zoneless’? [-Werror=implicit-function-declaration]
     if (!ip_addr_cmp_zoneless(ip_current_dest_addr(), &v6group)) {
          ^~~~~~~~~~~~~~~~~~~~
          ip6_addr_cmp_zoneless
../../../../lwip/src/apps/mdns/mdns.c:1817:10: error: nested extern declaration of ‘ip_addr_cmp_zoneless’ [-Werror=nested-externs]
cc1: all warnings being treated as errors

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-01-09 21:24:12 +01:00
goldsimon
2d06483d8e ip4_frag: don't use LWIP_ERROR where we might depend in input data
fuzz test revealed that an ip header with options might land in ip4_frag() via ICMP. In this case, we can't use LWIP_ERROR() to check for not having ip options as that might be defined to assert
2018-01-09 10:25:41 +01:00
Axel Lin
deab51c36d netif: Remove unnecessary NULL checking in netif_do_set_{ipaddr|netmask|gw}
The callers already ensure the ipaddr/netmask/gw won't be NULL, so remove
the duplicated NULL checking in these static functions.
While at it, also move the code saving old_address for netmask/gw as
it's only used when address is actually being changed.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2018-01-09 08:45:37 +01:00
goldsimon
0795e289eb ip4_reass: fix double-free of pbuf and wrong ip_reass_pbufcount
This was broken by commit f1072fee8a on 07/28/17 when trying to fix bug #51595
2018-01-09 08:19:43 +01:00
Axel Lin
efa90d4294 netif: Add LWIP_ASSERT_CORE_LOCKED() to netif_set_remove_callback
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2018-01-09 07:51:18 +01:00
Dirk Ziegelmeier
05ded5516d Apply patch #9536: netif: Prevent possible NULL pointer dereference in netif_set_addr in a modified version
Replace NULL pointers by IP4_ADDR_ANY4 - at sometime in the future, we make the NULL pointer handling obsolete and we can remove all the NULL pointer checks in the code
2018-01-09 07:51:09 +01:00
goldsimon
1affbb4bd5 unit tests: fixed testing itoa with too small buffer 2018-01-08 21:38:16 +01:00
David Girault
8801cbdb30 core: fix lwip_itoa()
See discussion in bug #51729

Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-01-08 21:37:31 +01:00
Dirk Ziegelmeier
d7566216c9 Remove Simon's compile fix in test_timers.c, it is not needed any more. The function is now used. 2018-01-08 13:02:58 +01:00
Dirk Ziegelmeier
bb0ba64fb0 Work on bug #52748: the bug in timeouts.c - apply Douglas' patch for absolute timeouts with modification to avoid cyclic timer overload situation 2018-01-08 12:48:48 +01:00
Dirk Ziegelmeier
5eced48869 Apply timeouts.c simplification from Douglas
Use TIME_LESS_THAN() macro instead of TIME_LESS_OR_EQUAL_THAN, it is more readable and results equivalent
2018-01-08 11:16:51 +01:00
Dirk Ziegelmeier
b6c0c52d66 Fix that one of Douglas' optimizations broke the timers
The unit tests failed and I didn't notice it :-(
2018-01-08 09:19:57 +01:00
Dirk Ziegelmeier
b4768f1711 Once again: Fix build warnings in test_timers.c 2018-01-08 08:34:17 +01:00
Dirk Ziegelmeier
bbb2e50327 Fix variable shadowing warning in my last commit 2018-01-08 08:12:33 +01:00