Commit Graph

5205 Commits

Author SHA1 Message Date
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
Dirk Ziegelmeier
38651b8069 Cleanup #include structure of altcp_tls a bit
(as discussed with Simon today)
2017-03-28 20:31:25 +02:00
goldsimon
b09b3fa4e6 altcp_tcp: some more debug checks 2017-03-28 16:20:20 +02:00
goldsimon
898d3832a7 more fixes for !LWIP_ALTCP: move mqtt client struct definitions to mqtt.c 2017-03-28 14:12:22 +02:00
goldsimon
537c258efa httpd/altcp: add forgotten functions 2017-03-28 14:04:40 +02:00
Dirk Ziegelmeier
7599706808 One more try to fix mqtt.c 2017-03-28 12:30:26 +02:00
Dirk Ziegelmeier
1c5237b6c4 Try to fix build of mqtt after ALTCP_TLS changes 2017-03-28 11:48:01 +02:00
goldsimon
8b6b270287 mqtt: clean up struct prototypes a bit 2017-03-28 09:20:59 +02:00
goldsimon
8673610f3f mqtt: add TLS support 2017-03-28 09:19:32 +02:00
goldsimon
26a6e034fc mqtt: convert to altcp API 2017-03-28 09:14:35 +02:00
goldsimon
1dfe916808 altcp_tcp: use 'void* state' to store tcp_pcb, not 'altcp_pcb* inner_conn' 2017-03-28 09:09:13 +02:00
goldsimon
881ab3011e mqtt: pass client_user/client_pass to server if != NULL 2017-03-27 22:25:26 +02:00
goldsimon
ca43e64d35 minor: fixed typo in doc 2017-03-27 12:23:02 +02:00
Daniel Elstner
751ee7a534 SNTP: Implement round-trip delay compensation
Introduce a new configuration define SNTP_COMP_ROUNDTRIP to compensate
for network round-trip delays when setting the system clock from SNTP.
Note that this feature requires compiler support for 64-bit arithmetic.
2017-03-27 10:43:03 +02:00
Daniel Elstner
cc77b308a4 SNTP: Unify timestamp extraction from response packet
Avoid piecemeal invocation of pbuf_copy_partial() for each SNTP header
field. The new code may sometimes copy more than necessary, but the
complexity is reduced.
2017-03-27 10:43:02 +02:00
Daniel Elstner
2fa9cd8530 SNTP: Streamline timestamp handling
Generalize the NTP timestamp conversion arithmetic, and provide hooks
for using native NTP timestamps when setting or getting the system
clock time. Convert microseconds to a fraction as needed when getting
the system time.
2017-03-27 10:43:01 +02:00
Daniel Elstner
9323ad3211 arch: Optionally support 64-bit integers 2017-03-27 10:43:00 +02:00
goldsimon
596bddac47 altcp: added raw tcp fallback for altcp_get_ip() #if !LWIP_ALTCP 2017-03-26 22:29:18 +02:00
goldsimon
425b2dda61 altcp_get_ip: added altcp_get_ip(), added default functions that only defer a call to the inner_conn (moved from tls_mbedtls to generic altcp) 2017-03-26 22:26:40 +02:00
goldsimon
1ab89ed5e6 bridgeif: fixed IPv6-only build 2017-03-26 20:52:05 +02:00
goldsimon
6add16e36b altcp_tls_mbedtls: fixed memory leak introduced by delayed deallocation 2017-03-25 20:35:46 +01:00
goldsimon
0581a77731 Prepare altcp_tls_mbedtls for TLS clients (not fully tested yet) 2017-03-24 15:25:43 +01:00
goldsimon
540b527cf4 remove LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS config option (this is implicitly done via #ifdef LWIP_RAND) 2017-03-24 14:29:06 +01:00
goldsimon
a2bc02d682 altcp_tls_mbedtls: improve sent/recved handling 2017-03-23 22:04:36 +01:00
goldsimon
1ddb125e2c altcp_tls_mbedtls_mem: fix compiling for sizeof(mem_size_t) < sizeof(size_t) 2017-03-23 12:15:54 +01:00
goldsimon
d71653f049 sockets.c: fix compiling in release mode 2017-03-23 10:44:28 +01:00
Dirk Ziegelmeier
819224f0e5 Fix bug #50618: dhcp_remove_struct() macro does not work
Patch by Benjamin Silvestre
2017-03-23 09:52:13 +01:00
goldsimon
a49e040072 sockets: remove select_cb definitions #if !LWIP_SOCKET_SELECT 2017-03-23 08:34:56 +01:00
goldsimon
5149141790 altcp_tls: remove declarations #if !LWIP_ALTCP_TLS 2017-03-23 08:34:36 +01:00
goldsimon
1e26652d2e renamed altcp_mbedtls files to altcp_tls_mbedtls 2017-03-23 08:34:02 +01:00
Dirk Ziegelmeier
ab736a4764 Add altcp to doxygen docs 2017-03-22 23:32:32 +01:00
Dirk Ziegelmeier
7e12240af3 Improve TCP documentation a bit 2017-03-22 23:32:17 +01:00