Commit Graph

5186 Commits

Author SHA1 Message Date
goldsimon
e0a2472706 netconn/sockets: remove fatal error handling, fix asynchronous error handling, ensure data before RST can be received 2017-04-12 12:37:16 +02:00
goldsimon
064044eeae sockets: speed up event_callback: don't iterate select_cb_list for NETCONN_EVT_RCVPLUS/SENDPLUS if the socket has been readable/writable before already 2017-04-12 09:12:55 +02:00
goldsimon
58c21eb13c sockets: speed up event_callback: don't iterate select_cb_list for NETCONN_EVT_RCVMINUS/SENDMINUS 2017-04-11 20:59:00 +02:00
goldsimon
b6fdb61654 sockets.c: refactor event_callback() a bit 2017-04-11 20:55:47 +02:00
goldsimon
b0af09ec45 select_cb_ctr no needed any more for LWIP_TCPIP_CORE_LOCKING==1 2017-04-11 12:50:25 +02:00
goldsimon
7b477b32b8 let unit test sys_arch check that a mutex is not taken recursively 2017-04-11 12:43:33 +02:00
goldsimon
92997756d1 task #14420 (Remove sys_sem_signal from inside SYS_ARCH_PROTECT crit section) done for LWIP_TCPIP_CORE_LOCKING==1 2017-04-11 12:40:44 +02:00
goldsimon
26d3466f50 Add macro ETH_ADDR() to initialize a struct eth_addr with its 6 bytes and taking care of correct braces 2017-04-11 08:49:15 +02:00
Dirk Ziegelmeier
8695e6e6cb Fixup BRIDGEIF_INITDATA2 macro 2017-04-07 08:59:26 +02:00
Dirk Ziegelmeier
7ba5cc3d52 Improve bridgeif doxygen docs 2017-04-07 08:01:38 +02:00
Joel Cunningham
557a11047d Patch #9307: Replace mem_malloc+memset with mem_calloc
Aside from reducing source code, on systems which use MEM_LIBC_MALLOC,
this has the potential to improve performance depending on the underlying
memory allocator

See http://stackoverflow.com/questions/2688466/why-mallocmemset-is-slower-than-calloc
2017-04-05 14:53:24 -05:00
goldsimon
b34f2d5605 altcp: allocate altcp_pcbs from a pool, not from heap (new option MEMP_NUM_ALTCP_PCB defaults to MEMP_NUM_TCP_PCB) 2017-04-05 12:18:48 +02:00
Dirk Ziegelmeier
0f4ad57033 Fix build error in bridgeif.c 2017-04-05 08:11:37 +02:00
goldsimon
9c78909857 bridgeif: sanity-check init_data->max_ports <= BRIDGEIF_MAX_PORTS 2017-04-04 22:12:38 +02:00
goldsimon
77df9ccd5a bridgeif: fix that max_fdb_static_entries was used to init dynamic FDB 2017-04-04 22:09:31 +02:00
goldsimon
2a30fedbea fix passing NULL to netif_set_gw & netif_set_netmask (or netif_set_addr or netif_add) (broken on 18.03.2017 by 2d9ef2215b) 2017-04-04 22:08:37 +02:00
goldsimon
97f4033a8a bridgeif: improve documentation 2017-04-04 21:54:52 +02:00
goldsimon
8ed2bd4771 bridgeif: gracefully handle out-of-memory in bridgeif_fdb_init 2017-04-04 21:54:30 +02:00
goldsimon
e65a0950b2 mem_calloc: check for mem_size_t overflow when multiplying 2 mem_size_t input values 2017-04-04 21:52:01 +02:00
Joel Cunningham
6fe66771cb test_tcp: de-duplicate test IP addresses, netmask, and ports
This creates a single version of test IP addresses, netmasks, and ports.
All tests were using the same values, but duplicated in each test

This also adds const to some functions so we can use a const version
of addresses
2017-03-31 12:01:43 -05:00
Joel Cunningham
648b2b6f2b test_tcp: remove unnecessary memsets
test_tcp_init_netif() memsets both netif and txcounters, so no need to manually do it
2017-03-31 11:59:12 -05:00
Joel Cunningham
34c9e30225 test_tcp: de-duplicate seqno checking defines
This commit moves common defines and senqo array so they can be
re-used in mulptiple places for sequence number checking rather
than duplicated

Currently they are used in two places, but I'm anticipating needing
them in future TCP unit tests
2017-03-31 11:57:33 -05:00
Dirk Ziegelmeier
6559ffd848 Fix C++ style comment in altcp_tls_mbedtls.c 2017-03-31 13:05:04 +02:00
goldsimon
33466ee6a8 dhcp_parse_reply: return ERR_VAL instead of asserting on offset-out-of-pbuf 2017-03-30 22:30:27 +02:00
goldsimon
1c57c84200 vj_uncompress_uncomp: copy from/to bigger buffers (used for checks before) instead of cs->cs_ip and ip; just to help static code analysis to see this is correct ;-) 2017-03-30 21:54:42 +02:00
goldsimon
aa0601a66d snmp_asn1_dec_tlv: explicitly check 'length_bytes > pbuf_stream->length' (for clarity, even if it would fail in pbuf_stream later) 2017-03-30 21:31:44 +02:00
goldsimon
3aa854409a pbuf_copy_partial: remove double-check of 'buf' and 'dataptr' 2017-03-30 21:29:53 +02:00
goldsimon
4313bf2a74 altcp_tls_mbedtls: fix TX when lower write returns ERR_MEM 2017-03-30 14:55:37 +02:00
goldsimon
51dbd1a7c0 altcp: added altcp_get_port() 2017-03-30 14:19:31 +02:00
Dirk Ziegelmeier
4a7569fc2d SNMP traps: Fix ignored return values 2017-03-30 13:01:10 +02:00
Dirk Ziegelmeier
132c285fd4 SNMP. Fix several ignored return values 2017-03-30 12:50:32 +02:00
Dirk Ziegelmeier
2673e635a3 Fix community string length copying - correctly handle long strings 2017-03-30 11:09:35 +02:00
Dirk Ziegelmeier
8d149e63a6 SNMP: strcpy -> strncpy, strlen -> strnlen 2017-03-30 08:57:53 +02:00
Joel Cunningham
c722261142 tcp: bug #50614: move unsent queue check/pcb->snd_buf update
This commit corrects what looks like an ancient incorrect organization
of the logic for processing an ACK which acks new data.  Once moved,
we can also change to using TCP_SEQ_LEQ on ackno instead of TCP_BETWEEN
because ackno has already been checked against snd_nxt

The work of checking the unsent queue and updating pcb->snd_buf (both
steps required for new data ACK) should be located under the conditional
that checks TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)

The comment following the unsent queue check/pcb->snd_buf update even
indicates "End of ACK for new data processing" when the logic is clearly
outside of this check

From what I can tell, this mis-organization isn't causing any incorrect
behavior since the unsent queue checked that ackno was between start of
segment and snd_nxt and recv_acked would be 0 during pcb->snd_buf update.
Instead this is waisted work for duplicate ACKS (can be common) and other
old ACKs
2017-03-29 16:24:54 -05:00
goldsimon
720f9b3a0b fix compiling altcp_tls_mbedtls sources/headers if mbedtls is not available 2017-03-29 23:02:16 +02:00
goldsimon
856b49a057 lwip_sendmsg: fix check for unsupported flags 2017-03-29 22:38:16 +02:00
goldsimon
5d600f72d2 bridgeif_input: check netif != NULL before calling netif_get_client_data() 2017-03-29 22:27:00 +02:00
goldsimon
ca9f57c09f lwip_fcntl/F_GETFL: no need to check sock->conn != NULL: already checked by get_socket() 2017-03-29 22:26:34 +02:00
goldsimon
5b6c654dd1 make F_GETFL return file access mode for !CORE_LOCKING as well 2017-03-29 20:54:24 +02:00
Joan Lledó
172dab1289 lwip_fcntl() returns access modes 2017-03-29 20:46:30 +02:00
Dirk Ziegelmeier
33e3ee0790 Clarify LWIP_ALTCP_TLS usage a bit 2017-03-29 08:52:19 +02:00
Dirk Ziegelmeier
8fd90ea136 improve mqtt documentation 2017-03-29 08:43:27 +02:00
Dirk Ziegelmeier
fbcdb4d9f1 Fix function name in altcp.c 2017-03-29 08:22:35 +02:00
Dirk Ziegelmeier
2ca717e18d altcp_tls.h: Document ARM mbedtls port 2017-03-28 21:34:00 +02:00
Dirk Ziegelmeier
40df1474cc SNMP: Advertise SNMPv3 support 2017-03-28 21:33:37 +02:00
Dirk Ziegelmeier
3266511ebb Improve documentation, add TLS stuff 2017-03-28 21:25:49 +02:00
Dirk Ziegelmeier
9b6192bd65 Create smtp_opts.h and add SMTP client to doxygen docs 2017-03-28 21:14:56 +02:00
Dirk Ziegelmeier
f7ac739022 Correct a few header #include guards 2017-03-28 20:44:39 +02:00
Dirk Ziegelmeier
b9dffc5e4b Filelists.mk: Move all mbedtls related files to own section 2017-03-28 20:42:21 +02:00
Dirk Ziegelmeier
3826bcceab Move SMTP from contrib to main lwIP rep - with TLS support, it becomes useful again 2017-03-28 20:40:47 +02:00