Commit Graph

5684 Commits

Author SHA1 Message Date
goldsimon
365e031340 httpd: fixed double-free for default 404 file () for LWIP_HTTPD_DYNAMIC_HEADERS==1 2017-11-13 21:04:24 +01:00
Joel Cunningham
1147b9ce38 test_dhcp: set link up on net_test netif
DHCP test code didn't set link up on net_test netif (exposed by changes
in 637bce91b4)

Then during the test_dhcp function, a Gratuitous ARP was not sent during
the call to dhcp_bind() because the link was still down

The sets the link state for all DHCP test functions
2017-11-08 14:42:28 -06:00
Joel Cunningham
637bce91b4 netif: ensure link and admin states are up in issue reports (bug #52353)
This fixes a bug where some callers of netif_issue_reports were not
checking that both link and admin states were up, leading to extraneous
reports when calling one of the following

 1) netif_set_ipaddr
 2) netif_ip6_addr_set_parts
 3) netif_ip6_addr_set_state

The bug has been fixed by placing link and admin state checks in
netif_issue_reports and not requiring the callers to perform this
checking
2017-11-08 13:38:48 -06:00
Dirk Ziegelmeier
d864f8c3a3 Fix bug #52368: Minor typo in comment
I think "Internet checksum functions" is OK
2017-11-08 19:52:40 +01:00
Axel Lin
7a241b6b52 slipif: Fix unbalance SYS_ARCH_PROTECT in slipif_process_rxqueue()
Fixes: 3d1a306518 ("SLIP netif: add support for multiple input strategies (threaded, polling, RX from ISR)")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-11-08 19:48:00 +01:00
Axel Lin
a8acca5902 Trivial typo fix
s/chekc/check/g

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-11-07 13:44:43 +01:00
Joel Cunningham
a78dbb25c5 docs: small clean ups for last couple of commits:
* Fix typos in LWIP_NO_CTYPE_H comment block
 * Update comment around caller of tcp_kill_prio()
2017-11-06 09:37:10 -06:00
Dirk Ziegelmeier
d8b6cdffcb Apply patch #9472: tcp_kill_prio: Don't kill active connection that has the same priority
in a modified, IMHO more readable way.
2017-11-06 12:53:08 +01:00
Axel Lin
41cf4012af pbuf: Simplify pbuf_get_contiguous implementation
Use pbuf_skip_const() to simplify the implementation.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-11-06 12:22:32 +01:00
Axel Lin
c1efb9e296 pbuf: Make pbuf_add_header/pbuf_remove_header return error if invalid parameters
It does not make sense to return success in p == NULL or
invalid header_size_increment/header_size_decrement cases. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-11-06 12:22:30 +01:00
Dirk Ziegelmeier
7eb462867b Fix follow-up to [bug #52315] Minor typo in output of MIB compiler
LWIP_SNMP_OBJ_ID_LEN -> SNMP_MAX_OBJ_ID_LEN
2017-11-05 11:51:23 +01:00
Dirk Ziegelmeier
849dfb17c7 The macros in ip6_addr.c are duplicated from ip4_addr.c, so move them to lwIPs portability layer
...didn't see that in the first place...
2017-11-05 10:27:46 +01:00
Dirk Ziegelmeier
93f4245e89 ip6_addr.c: Convert several macros to private #defines
The macros are functions from ctype.h, but ctype.h declares them as functions, not as #defines
It makes no sense to abstract them in lwIPs portability layer, the functions are of low complexity and they are only used in this file.
2017-11-05 10:13:24 +01:00
Dirk Ziegelmeier
a9a3d473ac Make xchar() a private #define of ip6_addr.c, it is not standardized in any C header 2017-11-05 10:06:25 +01:00
Dirk Ziegelmeier
de991b1158 Apply patch #9478: MQTT.c printf warning in debug messages
in a modified version that uses lwIP's format string #defines
2017-11-05 09:51:26 +01:00
Joel Cunningham
472f7985b5 Introduce LWIP_PACKED_CAST to fix error issue with ARMCC
ARMCC when using __packed structures will not implicitly convert a
pointer to a member of a packed structure to something which does not
have __packed. This results in a compiler error and was found with calls
to icmp6_param_problem

While there is a #pragma pack mode in ARMCC that disables this error, it
does require existing ports to switch over their packing mode and
perform integration
2017-11-01 09:05:06 -05:00
Joel Cunningham
d39e8cd827 docs: replace old reference to TCPIP_APIMSG with netconn_apimsg 2017-10-29 16:52:03 -05:00
Dirk Ziegelmeier
08ec234127 Related to patch #9471: pbuf: Drop casting to u8_t for increment the reference count
Cast to correct type: Needed to avoid warnings about integer cast (-Wconversion)
SYS_ARCH_SET cannot be used here
2017-10-28 15:41:15 +02:00
Dirk Ziegelmeier
4a9e845a53 Fix bug #52300: Minor type in snmp_opts.h
The comments for MIN and MAX need to be swapped
2017-10-28 15:37:22 +02:00
Joel Cunningham
b953bd0393 docs: fix minor mis-spelling in sys.c 2017-10-27 15:33:18 -05:00
goldsimon
283fec0a36 fixed copy&paste bug introduced in last commit 2017-10-26 11:30:26 +02:00
goldsimon
0f685e4fb5 Fixed bug #52279: httpd.c http_init_file() miss uri 2017-10-25 21:58:53 +02:00
Joel Cunningham
b296d2c7bb docs: update tcp_kill_prio same priority comments
tcp_kill_prio will kill the oldest active connection of same/lower
priority. Update all comments so that it's clear the same priority
can be killed
2017-10-25 09:08:23 -05:00
Joel Cunningham
b18e6a8734 sockets: fix missing break regression in event_callback
During the refactoring in c5db278746, the
previous gotos were removed, but the lack of break statements in
NETCONN_EVNT_RCVMINUS and NETCONN_EVT_SENDMINUS was overlooked, leading
to incorrect fall through behavior
2017-10-23 09:05:57 -05:00
Joel Cunningham
22dacc38c0 Revert "Fix two bad "fall-through" code"
This reverts commit a7f2ef4aec.

The fall through is actually a regression
2017-10-23 08:59:43 -05:00
Dirk Ziegelmeier
98d5e06dba Silence gcc 7 warning about fall-through in case statement by adding a comment 2017-10-22 21:27:32 +02:00
Dirk Ziegelmeier
a7f2ef4aec Fix two bad "fall-through" code 2017-10-22 21:26:57 +02:00
Dirk Ziegelmeier
ddcf9cc764 Move all rawapi.txt to appropriate doxygen docs 2017-10-20 21:40:23 +02:00
Dirk Ziegelmeier
33ce04019d Move API description text from rawapi.txt to doxygen docs 2017-10-20 18:44:58 +02:00
Dirk Ziegelmeier
a8edee8268 Move all text from sys_arch.txt to appropriate doxygen places 2017-10-20 18:23:06 +02:00
Joel Cunningham
9c175835d5 sockets: poll Open Group clean ups
1) Define remaining Open Group poll constants (values in hex)
2) Switch nfds_t to unsigned int

http://pubs.opengroup.org/onlinepubs/007908799/xsh/poll.h.html
2017-10-19 14:03:56 -05:00
Nate Karstens
1960937df3 Enable support for MSG_DONTWAIT in lwip_recvmsg()
Enables support for MSG_DONTWAIT in lwip_recvmsg(). Support already
exists in lwip_recv_tcp() and lwip_recvfrom_udp_raw(); these are both
accessible from lwip_recvfrom(), which already supports MSG_DONTWAIT.

Signed-off-by: Nate Karstens <nate.karstens@garmin.com>
Signed-off-by: Joel Cunningham <joel.cunningham@me.com>
2017-10-19 13:55:25 -05:00
Dirk Ziegelmeier
f41b5b84b1 Try to fix build of bridgeif_fdb.c 2017-10-19 12:16:11 +02:00
goldsimon
cf07fddf96 lwip_poll_dec_sockets_used: remove unused SYS_ARCH_DECL_PROTECT(lev); 2017-10-19 06:52:33 +02:00
Joel Cunningham
8d04f3d622 docs: correct LWIP_IPV6_MLD reference on #endif comment 2017-10-18 11:48:00 -05:00
Dirk Ziegelmeier
4f2dc05c7c Improve documentation on bridgeif_fdb 2017-10-18 18:31:38 +02:00
Dirk Ziegelmeier
b3a379c239 BridgeIF: Move FDB implementation into a separate file, implementation is easier to understand like this. 2017-10-18 18:27:35 +02:00
Dirk Ziegelmeier
8a46a853d2 Improve system abstraction layer doxygen docs by moving documentation from sys_arch.txt to sys.c 2017-10-17 22:38:18 +02:00
Dirk Ziegelmeier
26b2628f01 Improve system abstraction layer doxygen docs by moving documentation from sys_arch.txt to the corresponding functions 2017-10-17 22:30:51 +02:00
Dirk Ziegelmeier
33f29af0b6 Improve ZeroCopyRx.c code 2017-10-17 22:05:15 +02:00
Dirk Ziegelmeier
84b2a0f55b Remove raw API TCP/UDP function documentation from rawapi.txt - it is now integrated in doxygen docs.
This avoid having a second description for the same stuff that is "bit-rotting" because noone remembers to update this file.
Also remove outdated and misleading zero-copy TX information.
2017-10-17 21:59:34 +02:00
Dirk Ziegelmeier
d020bfc0df Improve UDP documentation using rawapi.txt texts 2017-10-17 21:50:18 +02:00
Dirk Ziegelmeier
558bd73a6d Fix comment indent in main_page.h 2017-10-16 23:27:00 +02:00
Dirk Ziegelmeier
001e1f1127 Improve lwIP doxygen documentation by copying several passages from rawapi.txt to the corresponding doxygen places 2017-10-16 23:24:52 +02:00
Dirk Ziegelmeier
921f601b5d Improve lwIP doxygen documentation by copying several passages from rawapi.txt to the corresponding function documentation 2017-10-16 23:14:28 +02:00
Our Air Quality
4d21d8da23 Allow LWIP_SOCKET_OFFSET with an external FD_SET
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-10-16 17:07:17 +02:00
Joel Cunningham
0882e0ba89 sockets: poll clean ups
This makes the following poll cleanups:

 1) Add LWIP_ERROR in lwip_poll to check for invalid fds/nfds combinations.
    This fixes a possible a NULL fds dereference in lwip_poll_scan()
 2) Use has_ copies of the socket events in lwip_poll_should_wake() rather
    passing the sock pointer and accessing socket after leaving the critical
    section
2017-10-16 08:06:31 -05:00
Dirk Ziegelmeier
653a1e7778 Fix bug #52113: recv callback: To free or not to free pbuf when returning ERR_ABRT?
Change the text according to Ambroz' suggestion
2017-10-16 10:01:45 +02:00
Dirk Ziegelmeier
ada6a84785 Fix documentation on relocating memory pools 2017-10-15 22:37:41 +02:00
Joel Cunningham
5d8d21fcae Add poll to CHANGELOG 2017-10-13 12:13:55 -05:00