Dirk Ziegelmeier
ecd6c7ceae
Fix bug #51525 : MQTT_OUTPUT_RINGBUF_SIZE validation
...
Ringbuf now supports sizes that are not a power of two
2017-07-26 18:53:12 +02:00
Dirk Ziegelmeier
0d23d686eb
snmp_asn1.c: Fix handling of u64 values
2017-07-26 12:48:19 +02:00
Dirk Ziegelmeier
0dabc8df9b
snmp_asn1: Surround u64_t handling functions with #if LWIP_HAVE_INT64
2017-07-26 09:42:41 +02:00
Dirk Ziegelmeier
b7e24fdc58
Accidentally removed a break statement in my last commit
2017-07-26 09:32:40 +02:00
Dirk Ziegelmeier
aa4d978448
Fix [bug #51520 ] Big endian bug in apps/snmp/snmp_asn1.c
...
Apply patch from Art Heers that does not need endianess checks
2017-07-26 09:28:07 +02:00
Dirk Ziegelmeier
f5d7535323
Work on [bug #51577 ] snmp/asn1: 64 bit encoding/decoding seems broken for big endian
...
We should support COUNTER64 data type only when we have u64_t on the system
2017-07-26 09:27:11 +02:00
goldsimon
4c13c32473
fix bug #51578 (SNMP failed to decode some values on non 32bit platforms)
2017-07-26 08:41:13 +02:00
Our Air Quality
5eff45cac0
Correct a few uses of sizeof(ip6_addr_t) to sizeof(ip6_addr_p_t)
...
The ip6_addr_t structure may have an addition slot so is not necessarily
the size of an ipv6 address, so some uses of sizeof(ip6_addr_t) were not
correct.
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-07-18 19:17:17 +02:00
goldsimon
f3c860958f
-Wconversion (still far from finished) and other minor compilation fixes...
2017-07-06 22:47:11 +02:00
goldsimon
44f7a3cb0d
work on -Wconversion...
2017-07-05 22:31:58 +02:00
Dirk Ziegelmeier
5a27e97baf
smtp.c: Fix detecting overlength server names
...
Thanks to Axel Lin
2017-06-14 22:06:37 +02:00
Dirk Ziegelmeier
3073affaaf
Axel Lin correctly pointed out that there is no buffer overflow because smtp_server[SMTP_MAX_SERVERNAME_LEN + 1] - there is always room for terminating 0 byte
2017-06-14 14:11:27 +02:00
Dirk Ziegelmeier
3611b583f5
smtp.c, smtp_set_server_addr: Avoid smtp_server buffer overrun when server name length is SMTP_MAX_SERVERNAME_LEN -> "smtp_server[len] = 0" is an out-of-bound access
2017-06-14 12:40:58 +02:00
Axel Lin
4af438916a
apps/smtp: Ensure smtp_server is NULL terminated
...
Ensure we set correct setting when changing smtp_server setting.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-06-14 12:33:57 +02:00
goldsimon
bab7a32eec
Remove smtp_server when passing NULL to smtp_set_server_addr() (see patch #9373 for discussion)
2017-06-13 22:00:48 +02:00
Axel Lin
117d3abdf8
apps/smtp: Make smtp_state_str/smtp_result_strs/base64_table static
...
These tables are only referenced in smtp.c, so make them static.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-06-13 21:57:03 +02:00
goldsimon
07cc25a9df
httpd: remove unnecessary "\0" suffix for CRLF string constant (see bug #51232 )
2017-06-13 21:53:35 +02:00
goldsimon
a92e838687
httpd: include hooks header file so that redefined defines/functions can be defined there
2017-06-13 21:13:45 +02:00
goldsimon
e80b2eb4cf
Fix mdns_resp_del_service
2017-05-12 13:21:42 +02:00
David Girault
c8b7759e10
mdns: added support for removing service in mdns responder
...
New function `mdns_resp_del_service()` added.
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-05-12 13:12:22 +02:00
Axel Lin
9dee346000
apps/smtp: Fix memory leak in smtp_send_mail_alloced error paths
...
Call smtp_free_struct(s) in all smtp_send_mail_alloced error paths to ensure
no memory leak.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-11 10:47:20 +02:00
goldsimon
ec9096be40
fixed typo in httpd debug message
2017-05-10 13:41:26 +02:00
Axel Lin
ae210967f2
apps/smtp: Fix memory leak if SMTP_BODYDH_MALLOC fails
...
Need to free s before return error.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-10 11:25:34 +02:00
Axel Lin
5bbe190b3b
apps/smtp: Make smtp_send_bodyh_data takes "const char **from" parameter
...
Fixes below build error:
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 -Wno-address -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/smtp/smtp.c
../../../../lwip/src/apps/smtp/smtp.c: In function ‘smtp_send_body_data_handler’:
../../../../lwip/src/apps/smtp/smtp.c:1487:41: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
if((res = smtp_send_bodyh_data(pcb, (char **)&s->body, &s->body_len))
^
../../../../lwip/src/apps/smtp/smtp.c:1507:47: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual]
((res = smtp_send_bodyh_data(pcb, (char **)&s->body, &s->body_len)) == BDHALLDATASENT)
^
cc1: all warnings being treated as errors
../../Common.allports.mk:94: recipe for target 'smtp.o' failed
make: *** [smtp.o] Error 1
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2017-05-10 08:43:07 +02:00
Axel Lin
f5f34f138c
apps/smtp: Fix missing altcp conversion in smtp_send_bodyh_data
...
The pcb is "struct altcp_pcb *" so we cannot call tcp_sndbuf/tcp_write here.
Use altcp_sndbuf/altcp_write instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-10 08:18:00 +02:00
Axel Lin
b9d5399ec1
apps/smtp: Trivial typo fixes
...
s/smpt/smtp/g
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-10 08:06:49 +02:00
goldsimon
d36306e30b
sntp_process: fixed unused variable if sub-second time info is not used
2017-05-04 15:49:12 +02:00
Axel Lin
bf510fee51
SNMP: Cleanup unreachable code
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
2017-05-04 09:15:29 +02:00
Daniel Elstner
ccf10a5023
SNTP: Avoid warning if debugging is disabled
2017-05-03 16:40:11 +02:00
goldsimon
39316bb9de
httpd: fixed bug #50915 (HTTP_IS_DATA_VOLATILE was wrong for LWIP_HTTPD_DYNAMIC_FILE_READ==1)
2017-05-03 09:57:12 +02:00
Dmitry
42eb98c9fc
Fix bugs in httpd with "LWIP_HTTPD_CUSTOM_FILES && LWIP_HTTPD_DYNAMIC_FILE_READ" when SSI tags (from '<' to '>' when they span from one read to the next or end at one read buffer) - bugs #50844 aqnd #50845
...
Signed-off-by: goldsimon <goldsimon@gmx.de>
2017-04-24 22:33:17 +02:00
Dirk Ziegelmeier
13f51a0318
Fix bug #50824 : Bug in SNTP POLL mode
...
Ignore all broken packets
Stop timeouts only when correct packet is received
2017-04-21 22:10:52 +02:00
goldsimon
554f5d7f9e
sntp: fix SNTP_LI_* bits; fix todo comment
2017-04-21 13:13:56 +02:00
goldsimon
84461e90e2
mqtt: fix shadowing global 'dup'
2017-04-21 07:23:32 +02:00
goldsimon
dfc57f0289
mqtt: move struct mqtt_client_s and inner structs to new file mqtt_priv.h (to hide it from apps but provide it for tests)
2017-04-12 21:50:58 +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
97f4033a8a
bridgeif: improve documentation
2017-04-04 21:54:52 +02:00
Dirk Ziegelmeier
6559ffd848
Fix C++ style comment in altcp_tls_mbedtls.c
2017-03-31 13:05:04 +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
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
goldsimon
720f9b3a0b
fix compiling altcp_tls_mbedtls sources/headers if mbedtls is not available
2017-03-29 23:02:16 +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
3826bcceab
Move SMTP from contrib to main lwIP rep - with TLS support, it becomes useful again
2017-03-28 20:40:47 +02:00