goldsimon
c981b726f8
fixed bug #47601 (wrong NS request at DAD)
2016-04-27 10:19:13 +02:00
Dirk Ziegelmeier
21e6e1c824
Fix compile errors found by Erik Ekman's Travis-CI
2016-04-26 22:09:23 +02:00
Dirk Ziegelmeier
b07031479c
Revert "tcpip_send_msg_wait_sem() can return void now due to my last changes"
...
My brain was asleep
This reverts commit 475be665ff
.
2016-04-26 22:03:18 +02:00
Dirk Ziegelmeier
475be665ff
tcpip_send_msg_wait_sem() can return void now due to my last changes
2016-04-26 21:40:19 +02:00
Dirk Ziegelmeier
3d38af5174
Work on bug #47512 : MPU_COMPATIBLE may fail on empty pool (not finished!)
2016-04-26 21:33:02 +02:00
Dirk Ziegelmeier
b28a80375b
Fix bug #47446 : tcpip api calls: fail if mbox is invalid instead of returning an error
2016-04-26 21:09:03 +02:00
Dirk Ziegelmeier
a5d4a27ae1
Fix compile warnings (==errors) in new httpd
2016-04-26 20:53:25 +02:00
goldsimon
afd9ee9147
fixed bug #47743 (Closing listening tcp pcb is not posible without assert)
2016-04-26 13:27:17 +02:00
Dirk Ziegelmeier
afd1bb938e
Fix compile of Simon's last change on MSVC
2016-04-26 13:19:32 +02:00
goldsimon
025d5591eb
httpd improvements: added persistent connections, improved asynchronous read mode, compile-time deflate compression, new CGI mode, SSI handler can be called with tag string (instead of tag index)
2016-04-26 13:00:27 +02:00
Dirk Ziegelmeier
7d77a52ea5
Fix compile when PPP is not enabled - Macro MEMP_NUM_PPP_PCB always needs to be #defined
2016-04-25 22:24:33 +02:00
Dirk Ziegelmeier
2b5250dd9d
Fix bug #47507 : PPP API does not support LWIP_MPU_COMPATIBLE
...
I'd be glad if someone would test it :-)
Sylvain, if you don't like this patch feel free to revert it
2016-04-25 21:23:14 +02:00
Dirk Ziegelmeier
8ce49499ae
tcpip_priv.h: More API improvements
2016-04-25 21:21:16 +02:00
Dirk Ziegelmeier
5a123a3405
tcpip_priv.h: More flexible API by including return value in API_VAR_ALLOC macro
2016-04-25 21:00:28 +02:00
Dirk Ziegelmeier
0d0b935d3d
tcpip_priv.h: Add helper macros for APIs that use private mempools
2016-04-25 20:51:26 +02:00
Dirk Ziegelmeier
2be86fbc3e
Fix compile of api_lib.c when LWIP_MPU_COMPATIBLE is enabled
2016-04-25 20:50:14 +02:00
Dirk Ziegelmeier
bb908366a5
More PPP cleanups
2016-04-25 20:08:29 +02:00
Dirk Ziegelmeier
73d8f14ebd
Fix compile when PPP is not enabled
2016-04-25 20:08:29 +02:00
Dirk Ziegelmeier
ffa340a68c
task #13907 : PPP cleanups: Move PPP mempools out of lwIP core to PPP code
2016-04-25 20:08:29 +02:00
Dirk Ziegelmeier
b8b83c2994
Move some definitions from tcpip_priv.h to better places since they are of "public interest" (LWIP core locking mode, watchdog trigger)
2016-04-23 10:24:17 +02:00
Dirk Ziegelmeier
4d1a2e6699
Fix projects without PPP do not compile any more
2016-04-22 06:24:01 +02:00
Sylvain Rochet
15fbfb7363
PPP, remove useless ppp_init function
...
Simon says:
ppp_init() does not seem to be used. The only thing it does is calling
magic_init(), which is not required because it its called again later
from ppp_input().
Also, the time from startup is rather constant, so calling sys_jiffies()
from ppp_init() does not create a random number.
2016-04-21 23:25:48 +02:00
Sylvain Rochet
54f7cae12c
PPP, fix reserved identifier violation (removed leading underscores from header include guards)
2016-04-21 23:15:49 +02:00
Dirk Ziegelmeier
76d25befb4
Work on task #13907 PPP cleanups: Move PPP options from opt.h to dedicated ppp_opts.h file
2016-04-21 22:28:14 +02:00
Dirk Ziegelmeier
749f7fae1a
Move PPP API files to netif/ppp subdir
2016-04-21 21:47:26 +02:00
Dirk Ziegelmeier
61d07f88f0
Fix bug #47749 : #define ETHARP_TRUST_IP_MAC does not compile
2016-04-21 21:21:56 +02:00
Joel Cunningham
8ac1b4825a
udp: use netif addr as src for multicast sockets
...
Sockets bound to a multicast address could not transmit multicast
packets because the pcb local address did not match the netif address
even if the outgoing netif was resolved correctly.
To correct the issue, pcbs with a multicast local address will use
the outgoing netif address as the source address in IPv4.
2016-04-18 16:36:13 -04:00
Dirk Ziegelmeier
87354abf0f
snmpv3_mbedtls.c: snmpv3_crypt() is only needed when LWIP_SNMP_V3_CRYPTO is enabled
2016-04-14 08:26:29 +02:00
Dirk Ziegelmeier
0b6370b9b8
SNMPv3: Make receiving DES encrypted frames work, sending still fails because of broken padding
2016-04-11 22:04:28 +02:00
Dirk Ziegelmeier
92f5da8412
two minor fixes in snmpv3_mbedtls.c
2016-04-07 06:58:58 +02:00
Dirk Ziegelmeier
309e072238
Create new IP_IS_V4 macros and use them at instead of !IP_IS_V6 - since we now have an IPADDR_ANY_TYPE, just checking for !V6 does not mean it is V4
2016-04-06 22:31:31 +02:00
Dirk Ziegelmeier
ab2c65549d
Avoid divisions / module in SNMP code on stupid compilers
...
Signed-off-by: goldsimon <goldsimon@gmx.de>
2016-04-06 11:16:54 +02:00
sg
ca1b8288de
prepare for overriding current timeout implementation: all stack-internal caclic timers are avaliable in the lwip_cyclic_timers array
2016-04-05 23:01:57 +02:00
sg
8c7f513f4d
patch #8358 : allow more combinations of listening PCB for IPv6
2016-04-05 22:04:19 +02:00
sg
16c70dd60e
fixed bug# 43739 (Accept not reporting errors about aborted connections): netconn_accept() returns ERR_ABRT (sockets: ECONNABORTED) for aborted connections, ERR_CLSD (sockets: EINVAL) if the listening netconn is closed, which better seems to follow the standard
2016-04-05 21:42:10 +02:00
sg
03e9c88488
fixed bug #47625 (Error in compilation of C++ source using netifapi macros) by changing NULL define for __cplusplus
2016-04-05 21:04:06 +02:00
sg
0731eda0b3
make autoip_supplied_address() take a const pointer, too
2016-04-05 20:38:11 +02:00
Dirk Ziegelmeier
083c6123d6
snmpv3_dummy.c: Add newline at end of file
2016-04-05 13:18:54 +02:00
Dirk Ziegelmeier
12a4cae404
Apply [patch #8969 ] from Freddie Chopin: Constify netif in dhcp_supplied_address()
2016-04-05 13:18:27 +02:00
Dirk Ziegelmeier
3a26e8b6cc
Fix build when snmpv3 is not available. One more thanks, Erik :-)
2016-04-04 22:10:59 +02:00
Dirk Ziegelmeier
28652d4d51
Fix build when mbedtls is not available :-) Thanks Erik!
2016-04-04 22:07:50 +02:00
Dirk Ziegelmeier
b67427bd3b
Commit Elias Oenal's SNMPv3 work, with some restructuring:
...
- The abstraction from crypto framework was not well suitable to MBEDTLS, so I decided to move everything into an own file.
- I removed several #defines and created function prototypes instead - this is more type-safe, and users don't need to reinvent the function signatures.
- Header files were splitted into a public and a private part.
- Only SNMPv3 authentication was tested, privacy not yet.
2016-04-04 18:55:32 +02:00
Dirk Ziegelmeier
3a7c998f91
Fix bug #47592 : pppapi_do_ppp_set_notify_phase_callback has invalid parameter type
...
... and one more I missed in my conversion yesterday
2016-04-01 10:38:27 +02:00
Dirk Ziegelmeier
141aeaab3d
Fix shadowing warning (when compiling in C++) in TCPIP call API. Reported by Freddie Chopin.
2016-03-31 19:52:20 +02:00
Dirk Ziegelmeier
c8b65f6c1d
Fix #define IPADDR_STRLEN_MAX in IPv6 only and dual-stack case
2016-03-30 11:20:54 +02:00
Dirk Ziegelmeier
d70d9bf866
SNTP: Add function to get SNTP enabled state
2016-03-30 11:20:16 +02:00
Dirk Ziegelmeier
4bd57882b0
Fix SNMP compile on Win32 due to missing #includes
2016-03-29 16:51:33 +02:00
Dirk Ziegelmeier
52fdc6bb3e
Partly apply Elias Oenal's SNMP V3 patch, part 2: Add SNMPv3 support routines. Crypto does not work yet.
2016-03-29 10:28:33 +02:00
Dirk Ziegelmeier
d0c3baf340
Partly apply Elias Oenal's SNMP V3 patch. There is more to come, the work is incomplete at the moment and does not compile when LWIP_SNMP_V3 is enabled.
2016-03-29 10:28:33 +02:00
Dirk Ziegelmeier
d8784a77b7
Fix bug #47556 : snmp agent uses wrong err 'ERR_ABRT' - use ERR_ARG as old code. Was tested to be != ERR_OK only, so actual code did not matter
2016-03-28 16:57:36 +02:00
sg
27f03798b9
Fixed possible problems with tcp_backlog_delayed/tcp_backlog_accepted
2016-03-25 16:19:39 +01:00
goldsimon
5b0a47ca87
removed unused return values of tcp_listen_input & tcp_timewait_input; fixed unused variable warning
2016-03-24 15:06:31 +01:00
Dirk Ziegelmeier
9b0a0841e9
Fix compile of snmp/snmp_mib2.c - don't know why I didn't notice yesterday...
2016-03-24 14:31:33 +01:00
goldsimon
0b4bc5ea31
minor whitespace change only
2016-03-24 07:15:27 +01:00
Dirk Ziegelmeier
cab341976e
SNMP: Reduce #includes of snmp_mib2.c
2016-03-23 22:36:02 +01:00
Dirk Ziegelmeier
52a3bf5d43
SNMP: Cleanups after my last changes
2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
63c2dc926e
SNMP: Move MIB2 ip subtree to separate file to get snmp_mib2.c smaller
2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
cc477361ad
SNMP: Move MIB2 system subtree to separate file to get snmp_mib2.c smaller
2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
377885581f
SNMP: Move MIB2 interfaces subtree to separate file to get snmp_mib2.c smaller
2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
7321420d8c
SNMP: Move MIB2 ICMP subtree to separate file to get snmp_mib2.c smaller
2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
9466d64a9a
SNMP: Move MIB2 TCP subtree to separate file to get snmp_mib2.c smaller
2016-03-23 22:32:47 +01:00
Dirk Ziegelmeier
d929a4b17e
SNMP: Move MIB2 UDP subtree to separate file to get snmp_mib2.c smaller
2016-03-23 22:32:46 +01:00
Dirk Ziegelmeier
945607e094
SNMP: Move MIB2 SNMP subtree to separate file to get snmp_mib2.c smaller
2016-03-23 22:32:46 +01:00
sg
7721b20179
call accept-callback with ERR_MEM when allocating a pcb fails on passive open to inform the application about this error; ATTENTION: applications have to handle NULL pcb in accept callback!
2016-03-23 21:57:38 +01:00
sg
c6b742812d
fixed bug #38203 : DHCP options are not recorded in all DHCP ack messages (patch by Florent Matignon)
2016-03-23 21:06:52 +01:00
goldsimon
85d5fbdc7f
lwip_accept: fixed returning EOPNOTSUPP instead of -1 (EOPNOTSUPP is set as socket error)
2016-03-23 14:27:40 +01:00
Axel Lin
449fc98a55
tcp_alloc(): Remove superfluous initialization for pcb->keep_cnt_sent
...
It's already done by memset(0). This was missed in commit 5794ac2340
"tcp_alloc(): remove explicit =0 already done by memset(0)", fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-03-23 14:26:32 +01:00
Dirk Ziegelmeier
7e7f2f31ff
Cleanup and simplify tcpip_api_call() implementation a bit
2016-03-22 21:52:11 +01:00
Dirk Ziegelmeier
a1fc91afa8
Fix newly introduced tcpip_api_call did not return correct return value
2016-03-22 21:34:05 +01:00
goldsimon
c39ef75cb3
... and another compiler error: tcp_nagle_enable() must stay at tcpflags_t, not using u16_t
2016-03-22 15:58:00 +01:00
goldsimon
7bda462031
fixed wrong commit: compatibility-define tcp_accepted() was accidentally commented-out
2016-03-22 15:54:14 +01:00
Dirk Ziegelmeier
f97bf85fd6
udp.c: Allow udp_connect() on a dual-stack UDP PCB (type IPADDR_TYPE_ANY). This may be useful in some applications - no need to keep separate storage for target IP.
2016-03-22 15:12:16 +01:00
sg
dd80759bb9
tcp: changed accept handling to be done internally: the application does not have to call tcp_accepted() any more. Instead, when delaying accept (e.g. sockets do), call tcp_backlog_delayed()/tcp_backlog_accepted() (fixes bug #46696 )
2016-03-22 07:30:44 +01:00
sg
a1c78ea7bf
ignore dns response parsing errors, only abort resolving for correct responses or error responses from correct server (bug #47459 )
2016-03-22 07:22:17 +01:00
sg
5794ac2340
tcp_alloc(): remove explicit =0 already done by memset(0)
2016-03-18 22:05:17 +01:00
sg
44e1a2d8e2
define tcp_backlog_set() as dummy-define when backlog feature is disable
2016-03-18 20:05:04 +01:00
sg
149bb36805
fixed bug #47448 (netconn/socket leak if RST is received during close)
2016-03-17 21:49:01 +01:00
Joel Cunningham
93ccba9bcb
don't fail closing a socket/netconn when failing to allocate the FIN segment; blocking the calling thread for a while is better than risking leaking a netconn/socket (see bug #46701 )
...
Signed-off-by: sg <goldsimon@gmx.de>
2016-03-17 21:00:18 +01:00
sg
b24e5cd1c8
fixed compiling netconn_write_partly with LWIP_SO_SNDTIMEO==1 after recent api implementation changes (bug #47436 , patch by William Hayes)
2016-03-17 20:15:22 +01:00
Dirk Ziegelmeier
7fbb5fc82a
Fix netconn API in core locking mode
2016-03-17 09:31:50 +01:00
Dirk Ziegelmeier
464a8c9794
Delete script to compile MOBA MIB
2016-03-17 08:27:45 +01:00
Dirk Ziegelmeier
7aea739f87
PPPAPI: Don't return garbage in *_create calls in case tcpip_api_call() fails;
...
Let some functions return err_t instead of void because tcpip_api_call() may fail
2016-03-16 23:01:05 +01:00
sg
852d5b9c80
Optimize tcp_output runtime by not calling ip_route() for every segment sent
2016-03-16 22:31:33 +01:00
sg
b4d7238eb8
tcp_output_segment: don't count retransmitted segments in mib2.tcpoutsegs by detecting p->payload != tcphdr pointer; don't try to retransmit segments where p->ref != 1 (as it is invalid to mess up p->len/p->payload when we don't have exclusive access to the pbuf)
2016-03-16 22:22:20 +01:00
Dirk Ziegelmeier
ee87d28252
Rename tcpip_apimsg to netconn_apimsg (better suits naming convention in api_lib.c)
2016-03-16 22:02:47 +01:00
Dirk Ziegelmeier
6ffe12cede
Readd struct protoype in api.h
2016-03-16 21:57:25 +01:00
Dirk Ziegelmeier
d6adc1f6cb
Rename tcpip_send_api_msg to tcpip_send_msg_wait_sem (hopefully a little bit clearer name)
2016-03-16 21:57:24 +01:00
sg
5f8b5cbb20
reset rto timer on fast retransmission (see task #13757 , patch by Joel Cunningham)
2016-03-16 21:49:37 +01:00
sg
7b9cb98bbb
LWIP_TCPIP_CORE_LOCKING_INPUT is not experimental any more, as well
2016-03-16 21:48:47 +01:00
Dirk Ziegelmeier
222eb25eb5
Accidentally committed my MIB compiler test, sorry!
2016-03-16 21:38:22 +01:00
Dirk Ziegelmeier
dbfdb13166
LwipMibCompiler: Set MIB compiler as startup project instead of MIB viewer
2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
d38cdccbcd
netconn API: Remove api_msg wrapper struct, it is not needed any more
2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
2575c7fb5f
netconn API: Cleanup, remove lots of #defines, take advantage of new tcpip_send_api_msg function feature to abstract core locking away
2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
ea174560b1
tcpip.c tcpip_send_api_msg: Handle core locking case internally
2016-03-16 21:35:21 +01:00
Dirk Ziegelmeier
bc51dddcaf
Add some comments to functions and #defines. According to Simon, LWIP core locking is not experimental any more.
2016-03-16 21:35:21 +01:00
sg
f09dec5fb7
ethernetif.c: implement SNMP counters, simplify input function: no need to check ethType, ethernet_input() already does this
2016-03-16 21:26:31 +01:00
sg
8e8571da6a
fixed bug #46384 Segment size calculation bug with MSS != TCP_MSS
2016-03-16 16:56:15 +01:00
Dirk Ziegelmeier
0d576aa521
Fix bug #47426 incorrect typecast in pppapi.c
2016-03-16 12:37:08 +01:00
goldsimon
0e1b401abe
sntp: fixed constness for SNTP_SERVER_DNS==1
2016-03-14 14:29:26 +01:00
Dirk Ziegelmeier
bf7fc41e0f
LwipMibCompiler: Add windows command line example
2016-03-14 12:13:44 +01:00
Dirk Ziegelmeier
90bc1da434
LwipMibCompiler: Don't generate empty root nodes
2016-03-14 12:13:24 +01:00
Dirk Ziegelmeier
dc98e31e4d
LwipMibCompiler: MibTree: Adapt coding style to the rest of the C# project
2016-03-14 12:13:05 +01:00
Dirk Ziegelmeier
1d7996dc47
tcpip API calls: Implement LWIP_NETCONN_SEM_PER_THREAD support for ALL API calls
2016-03-13 19:43:49 +01:00
Dirk Ziegelmeier
2b3db52c70
pppol2tp.c: Avoid an #ifdef - there is a new UDP API function that can be used here
2016-03-12 12:26:23 +01:00
Jan Breuer
b65a22b32a
LwipMibCompiler: Don't preserve upper case on generated variables
2016-03-12 09:09:26 +01:00
Jan Breuer
b849e52c17
LwipMibCompiler: preserve upper case in comments
2016-03-12 09:09:22 +01:00
Jan Breuer
588b11185a
LwipMibCompiler: Remove false positive root entities
2016-03-12 09:05:19 +01:00
Jan Breuer
dfc963880a
LwipMibCompiler: Fix generating SnmpScalarArrayNode callbacks
2016-03-12 09:03:41 +01:00
Dirk Ziegelmeier
00975769a0
Minor TCPIP API call functions cleanup
2016-03-10 22:44:31 +01:00
Dirk Ziegelmeier
f7a3d6cca5
Port PPP API to new simple tcpip API call method
2016-03-10 22:44:25 +01:00
Dirk Ziegelmeier
8f71795844
Port netifapi to new simple tcpip API call method
2016-03-10 22:42:21 +01:00
Dirk Ziegelmeier
8106413644
tcpip.c: Implement an easier way for TCPIP API calls - client code does not have to deal with semaphores and core locking any more
2016-03-10 22:42:21 +01:00
sg
5e472badf1
Work on bug #44595 : remove check for recvmbox != NULL from netconn_recv() to let it return ERR_CLSD for half-closed TCP connections
2016-03-10 21:20:25 +01:00
Axel Lin
2a2f92f7c2
Make ERR_IS_FATAL() test first fatal error instead of last non-fatal error
...
This way, we don't need to update ERR_IS_FATAL() every time new non-fatal error
is added. Also drop 2 empty lines so the error constants present in 2 groups,
non-fatal errors and fatal errors.
2016-03-10 07:21:34 +01:00
Dirk Ziegelmeier
f3b7bca3cf
Fix bug #47370 : Port DNS client to IPv6
2016-03-09 19:25:06 +01:00
Dirk Ziegelmeier
9fbf5a4004
SNMP: Support LWIP_TCPIP_CORE_LOCKING sync method
2016-03-09 08:39:56 +01:00
sg
5d637360cc
fixed ERR_IS_FATAL() after changing ERR_IF to non-fatal
2016-03-08 21:04:21 +01:00
Dirk Ziegelmeier
7d8f0c781f
Fix wrong usage of LWIP_NETCONN_SEM_PER_THREAD macro in api_msg.h
2016-03-08 19:53:37 +01:00
Dirk Ziegelmeier
a212210c35
Add missing #include in memp.c
2016-03-08 19:53:01 +01:00
Dirk Ziegelmeier
ba40925335
tcpip_send_api_msg function is only needed in non-core-locking mode
2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
eab92ccb03
netifapi: Eliminate wrapper struct netifapi_msg and rename netifapi_msg_msg to netifapi_msg
2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
fc17d02451
Fix compile with LWIP_TCPIP_CORE_LOCKING
2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
37d514c949
Minor cleanups in #includes and comments
2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
a4297ef0fd
Reduce includes of tcpip_priv.h
2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
c65eca58c9
Decouple tcpip.c/tcpip_priv.h from netconn API
2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
18bb74e5c5
Decouple tcpip.c/tcpip_priv.h from PPP API
...
PPP API can now be moved to netif/ppp subdir
2016-03-08 19:41:32 +01:00
Dirk Ziegelmeier
af1978fa4e
Implement generic API message handling
...
Add generic tcpip_send_api_msg function
Let netif API and netconn API use it
Decouple tcpip.c and tcpip_priv.h from netif API
2016-03-08 19:41:32 +01:00
sg
5cf802eda0
dns_gethostbyname: return error code if no valid server is set instead of calling the 'found' callback in this case (fixes bug #46887 )
2016-03-07 19:47:39 +01:00
Joel Cunningham
80cc988f2f
Optimize sendmsg UDP pbuf chain creation
...
This commit optimizes the sendmsg UDP pbuf chain creation by not
allocating/freeing a netbuf per io vector and instead building a pbuf
chain directly in the sockets layer
2016-03-07 09:26:58 -06:00
sg
076795562e
fixed typo in one of the last commits
2016-03-06 20:59:50 +01:00
sg
f5fef6eebc
fixed bug #45353 : IPv6 router / neighbor relationship is not always consistent - patch by Stian Sebastian Skjelstad
2016-03-06 14:48:41 +01:00
sg
375ec36246
ERR_IF is not necessarily a fatal error (fixes bug #46338 : UDP netconns block after fatal error)
2016-03-05 16:15:04 +01:00
sg
b00a17059a
fixed icmp_send_response with LWIP_HOOK_IP4_ROUTE_SRC enabled
2016-03-05 15:57:40 +01:00
Dirk Ziegelmeier
bcab7fef84
netifapi.c: Fix compile when IPv4 is not enabled
2016-03-05 15:55:53 +01:00
sg
d2bb569ee4
bug #46094 : moved IPv4 routing hook functions down so that they implement actual routing (source-based IPv4 routing is not affected by this change)
2016-03-05 15:52:39 +01:00
Dirk Ziegelmeier
52b426a343
ip_addr.h: Use IP_GET_TYPE macro in other macros
2016-03-05 14:35:29 +01:00
Dirk Ziegelmeier
f4fbc90217
netifapi: Do not pass NULL pointers for IP addresses to subsequent functions
...
Same as in my last commits - this avoids errors in lwIP code where ip addresses are dereferenced (e.g. for IP type checking) without handling thinking about NULL pointers.
2016-03-05 14:35:29 +01:00
sg
e0ab8c581d
fixed bug #46093 : Move IP6_ROUTE() hook to after LL processing
2016-03-05 14:11:24 +01:00
Dirk Ziegelmeier
094cdf1c7b
netconn: Create API macros to get/set IPV6ONLY flag
2016-03-04 23:06:33 +01:00
Dirk Ziegelmeier
814577fcc6
snmp: Fix snmp_oid_to_ip for IPADDR_ANY_TYPE ips
2016-03-04 22:46:54 +01:00
Dirk Ziegelmeier
15925b66c6
Fix ip_addr_cmp to correctly compare IPADDR_ANY_TYPE ips
2016-03-04 22:46:18 +01:00
Dirk Ziegelmeier
925b280fd2
Apply patch from Elias Önal to fix a few datatypes in SNMP MIB2
2016-03-04 22:35:09 +01:00
sg
6b405eccd0
Tried to fix bug #47270 by accepting all ipv4 multicast packets (at IP level) when LWIP_IGMP is disabled
2016-03-04 21:57:47 +01:00
goldsimon
15326cdbad
Added macro to get the ip address type
2016-03-04 09:07:50 +01:00
Dirk Ziegelmeier
bd0b51c9ef
Fix my previous netconn_do_listen changes in lwip_netconn_do_listen
2016-03-03 23:16:01 +01:00
Dirk Ziegelmeier
9a4c66006e
Fix compile error in raw.c (possible unused arg)
2016-03-03 22:55:42 +01:00
Dirk Ziegelmeier
1c52780b62
snmp_netconn: Use new "socket-like" netconn API dual-stack implementation
2016-03-03 22:52:43 +01:00
Dirk Ziegelmeier
bee5515e9a
netconn API: Reimplement dual-stack API to be socket-like.
...
When IPv6 ANY address is used and the NETCONN_FLAG_IPV6_V6ONLY is NOT set, bind/listen on/to IP_ANY_TYPE
2016-03-03 22:52:04 +01:00
Dirk Ziegelmeier
0a7f404d09
api_lib.c: Don't propagate NULL pointers as ip address to subsequent functions
2016-03-03 22:49:55 +01:00
Dirk Ziegelmeier
1dea649cff
Fix comment in tcp.c
2016-03-03 22:48:10 +01:00
Dirk Ziegelmeier
7396d8818b
Implement dual-stack in RAW API in the same way as in UDP and TCP
2016-03-03 22:47:27 +01:00
Dirk Ziegelmeier
2d80af1dcb
Minor code cleanup in udp.c
2016-03-03 22:44:01 +01:00
Dirk Ziegelmeier
b5cd90a342
Add compatibility macro for tcp_new_ip6()
2016-03-03 21:04:00 +01:00
Dirk Ziegelmeier
5358380c5f
Apply patch from Derek Pravala: Fix segfault in ip6_route when there is no default netif
2016-03-03 16:12:20 +01:00
Dirk Ziegelmeier
eead3a7038
Simon says: dual-stack does not work on iperf because there IPs encoded in the payloads and IPv6 is not supported there in the current lwIP implementation -> revert
2016-03-03 13:06:55 +01:00
Dirk Ziegelmeier
ce370ec48f
Compile fix lwiperf.c after my last change
2016-03-03 12:23:34 +01:00
Dirk Ziegelmeier
24ebf6bd6f
Implement dual-stack in lwiperf, netbiosns and sntp
2016-03-03 12:15:57 +01:00
Dirk Ziegelmeier
b0d4386744
Adapt HTTP server to new dual-stack API
2016-03-02 23:47:09 +01:00
Dirk Ziegelmeier
0c673b6a44
Implement new style TCP dual-stack in netconn API
2016-03-02 23:46:22 +01:00
Dirk Ziegelmeier
e89b48d23f
raw.c: Avoid NULL pointer dereference
2016-03-02 23:44:51 +01:00
Dirk Ziegelmeier
f9ce31f98b
TCP: Implement dual stack support using new IP_ANY_TYPE introduced at UDP
2016-03-02 23:14:33 +01:00
Dirk Ziegelmeier
bd131e5e4b
ip_addr.h: Update ip_addr_copy macro to correctly copy new IP_ANY_TYPE address
2016-03-02 23:11:34 +01:00
Dirk Ziegelmeier
f3132c5290
udp: Fix possible NULL pointer dereference, update comments
2016-03-02 23:10:43 +01:00
Dirk Ziegelmeier
babb247e2a
SNMP MIB2: Fix temporary OID buffer size some tables have been too small
2016-03-02 23:09:51 +01:00
Dirk Ziegelmeier
cc4f94f415
lowpan6: Fix incorrect array bounds check (found by Coverity)
2016-03-02 19:45:15 +01:00
Dirk Ziegelmeier
9885d5d9f5
Apply patch from Simon to fix buffer overflow handling tcp_in.c which was discovered by Coverity
2016-02-29 23:34:52 +01:00
Dirk Ziegelmeier
8e5663a32f
Minor: Avoid ip_input() call indirection for when only IPv4 or IPv6 are enabled
2016-02-29 22:17:42 +01:00
Dirk Ziegelmeier
4bbfc3857a
Implement dual-stack in SNMP for netconn API
2016-02-29 19:31:19 +01:00
Dirk Ziegelmeier
5404ce3c0a
Implement support for UDP IP_ANY_TYPE in netconn API
2016-02-29 19:31:19 +01:00
Dirk Ziegelmeier
2289673a30
Implement support for IP_ANY_TYPE in SNMP
2016-02-29 19:31:19 +01:00
Dirk Ziegelmeier
6aed6e659f
Rework DHCP PCB handling: Old code registered one UDP PCB per netif where DHCP was active and there was a special case in udp_input() for this. New implementation uses one PCB for all netifs and removes special case in udp_input().
...
The old approach called udp_bind() on each of the PCBs, which puts them into udp_pcbs list. The PCBs were iterated on all non-DHCP udp_inputs() with no effect.
My cleanup removes the special handling in udp.c, and uses only one DHCP UDP PCB to catch all DHCP messages from all netifs. The dhcp_recv function then checks whether ip_current_input_netif() has DHCP enabled - if not, the message is ignored. The PCB is only created/registered when one or more PCBs have DHCP enabled.
2016-02-29 19:31:19 +01:00
Dirk Ziegelmeier
42c92f80f1
Add compatibility macro for udp_new_ip6()
2016-02-29 13:25:13 +01:00
goldsimon
fa16ee8dcb
cleaned up includes a bit after IPv6 changes
2016-02-29 09:27:59 +01:00
Dirk Ziegelmeier
70f3e5ed05
Cleanup: Create new file ip.c and move dual-stack code from ipv4 and ipv6 folder in there
2016-02-26 23:04:51 +01:00
Dirk Ziegelmeier
2dc8f59bf4
Fix compile when PPPOE is enabled
2016-02-26 22:50:44 +01:00
Dirk Ziegelmeier
d5778bad2f
No need for dual-stack code in ip4.c and icmp.c -> use ip4 only versions
2016-02-26 22:50:20 +01:00
goldsimon
81c8121551
minor: fixed compiler warning "unary minus operator is applied to an unsigned expression"
2016-02-26 15:23:04 +01:00
goldsimon
97b7555119
bring back ETHARP_HWADDR_LEN (if anyone uses it)
2016-02-26 14:21:03 +01:00
Dirk Ziegelmeier
a5214abd04
udp: udp_send and udp_send_chksum: Check for PCB NULL pointer and PCB must not be the new IP_ANY_TYPE, but a real IPv4 and IPv6 address
2016-02-26 09:20:50 +01:00
goldsimon
bf8bcfafe2
revert accidentally committed comment from a649a3eb50
2016-02-26 08:59:50 +01:00
Joel Cunningham
8cb64698aa
Allow backlog to be updated
...
This commit adds support to the sockets and netconn layer to update the
backlog by calling listen when the netconn is already in the listen state.
When backlog is not enabled, the call returns successfully
This commit also introduces a macro for setting the backlog value that
prevents a 0 sized (invalid) backlog
2016-02-25 15:19:52 -06:00
sg
163d7f9791
added ethernet.c to Filelists.mk
2016-02-25 22:11:16 +01:00
sg
a649a3eb50
dual-stack fix: moved common definitions/code for ethernet used by etharp and ethip6 to new files ethernet.h/.c
2016-02-25 22:10:28 +01:00
Joel Cunningham
2a8398dfb8
Fix bug in FIONREAD handling in LINUXMODE
...
Fix a bug in the socket API's ioctl for FIONREAD. If the socket's
lastdata was assigned the function returned without error but did not
update the argument pointer.
The cast type for argp was also changed to int to conform with the
other SO_RCVBUF handling.
2016-02-25 12:53:12 -06:00
Dirk Ziegelmeier
fd891081c4
minor: Cleanups in raw/tcp/udp code by using macros and reducing #ifdefs
2016-02-24 23:04:25 +01:00
Dirk Ziegelmeier
953b7bdd59
Implement UDP dual-stack PCB support
...
Create special IP address type "IPADDR_TYPE_ANY" for it.
SNMP uses new feature in non-netconn mode.
TODO: Same for TCP & RAW, adapt NETCONN to use this feature
2016-02-24 22:37:01 +01:00
sg
1dde3d6e56
Fixed bug #46524 : "Device as dhcp server does not work after upgrade to lwip-1.4.1"
2016-02-24 22:13:58 +01:00
sg
ec49b68b38
minor: udp_input/local_match: coding style, added comments
2016-02-24 22:04:59 +01:00
sg
68590c2b27
minor/coding style: lowpan6_opts.h: tabs->spaces, trim trailing spaces
2016-02-24 22:03:40 +01:00
Dirk Ziegelmeier
ac4b089b18
udp.c: Further udp_input simplifications
...
- Move local PCB matching code in a function that can be reused in SO_REUSE && SO_REUSE_RXTOALL case.
- Some checks have been written in the dual-stack version and then repeated with the ipv6-only version. Example:
IPv6 only: ip6_addr_ismulticast(ip6_current_dest_addr())
IPv4 AND IPv6: ip_addr_ismulticast(ip_current_dest_addr())
2016-02-24 19:57:20 +01:00
Dirk Ziegelmeier
005c196ed8
udp.c: Simplify and cleanup input PCB matching
2016-02-24 19:13:30 +01:00
Dirk Ziegelmeier
3b5803ec9a
sys.h: Avoid un #defined LWIP_COMPAT_MUTEX macro (usually #defined in arch/sys_arch.h)
2016-02-23 15:49:58 +01:00
Dirk Ziegelmeier
fd4a109ffa
lowpan6.c: Implement SNMP counters
2016-02-23 13:01:46 +01:00
Dirk Ziegelmeier
481d350bf3
lwip/stats.h: Add some comments to MIB2 variables to explain correct usage a bit
2016-02-23 12:08:31 +01:00
Dirk Ziegelmeier
d121ea84d0
Add note about 6LoWPAN in src/netif/FILES
2016-02-23 11:46:28 +01:00
goldsimon
a5ac41c203
lowpan6: fixed compiler warning when casting u16_t to u8_t
2016-02-23 11:28:54 +01:00
goldsimon
e4457335b8
minor: tried to fix coding style in lowpan6.c
2016-02-23 10:36:16 +01:00
Dirk Ziegelmeier
680f8f31ab
I don't know why I have a diff here (I guess line ending problems like in my last lowpan6.c commit)...
2016-02-23 10:20:05 +01:00
Dirk Ziegelmeier
6650eb4cd2
snmp_traps.c: Fix compile on Win32 - missing string.h include
...
Catch possible strlen returnvalue > 0xffff
2016-02-23 10:06:46 +01:00
Dirk Ziegelmeier
799fe7a5ba
Fix shadowing warning in lowpan6.c - found by Erik Ekman's Travis CI
...
https://travis-ci.org/yarrick/lwip-merged
2016-02-23 08:58:34 +01:00
Dirk Ziegelmeier
9a4d7b9956
Use netif_input_fn typedef instead of creating a new one in tcpip.h
2016-02-22 21:10:50 +01:00
Dirk Ziegelmeier
fe8d2ba72f
Eliminate tcpip_pppos_input function
2016-02-22 21:00:00 +01:00
Dirk Ziegelmeier
e2a3565971
Initial import of Ivan Delamer's 6LoWPAN implementation with slight modifications to allow compiling in IPv6 only mode
2016-02-22 20:44:32 +01:00
Dirk Ziegelmeier
aeab047ede
slipif: Fix compile when only IPv6 is enabled
2016-02-22 20:43:32 +01:00
Dirk Ziegelmeier
777e667f08
Add generic tcpip_inpkt function that can be called to make last changes really usable
2016-02-22 20:18:10 +01:00
Dirk Ziegelmeier
fa6f068fd1
Eliminate TCPIP_MSG_INPKT_PPPOS message type.
...
Fix my last commit, I accidentally unchecked the wrong file in commit dialog
2016-02-22 17:47:01 +01:00
Dirk Ziegelmeier
439ae629e0
Change TCPIP INPKT API message to take a function pointer. Allows integration of other protocols without extending lwIP core (e.g. 6LoWPAN)
...
Remove unused sem member of struct tcpip_msg
2016-02-22 17:39:01 +01:00
Dirk Ziegelmeier
17fad79f71
Two compile fixes after eliminating isipv6 member in PCBs
2016-02-22 17:07:17 +01:00
Dirk Ziegelmeier
d8531a2407
Cleanup NETCONNTYPE_ISIPV6 macro
2016-02-22 13:55:27 +01:00
Dirk Ziegelmeier
c805843e64
Change signature of ip_output, ip_output_if, ip_output_if_src, ip_output_hinted, ip_route, ip_netif_get_local_ip, ip_route_get_local_ip and tcp_eff_send_mss not to take an isipv6 parameter. Use the IP version of the destination address instead.
2016-02-22 13:38:40 +01:00
Dirk Ziegelmeier
880f1008d6
Together with Simon: Eliminate last instances of isipv6 member in pcbs;
...
Don't allow NULL pointers (IPv4 ANY) in connect() and sendto() functions as destinations since this does not make sense.
2016-02-22 13:03:51 +01:00
Dirk Ziegelmeier
be9cd800b0
Review with Simon: Init TCP/UDP/RAW PCBs with correct IP types in _new functions to make my changes work correct
2016-02-22 11:16:13 +01:00
Dirk Ziegelmeier
0106cf7ae0
Review with Simon: Remove dead code (since 2003)
2016-02-22 10:18:19 +01:00
Dirk Ziegelmeier
50303eea23
Reduce PCB_ISIPV6 macro usage some more
2016-02-21 19:59:08 +01:00
Dirk Ziegelmeier
339e82d7aa
Eliminate IP_PCB_IPVER_EQ macro
2016-02-21 19:45:51 +01:00
Dirk Ziegelmeier
5a25652c21
Eliminate IP_PCB_IPVER_INPUT_MATCH macro
2016-02-21 19:21:36 +01:00
Dirk Ziegelmeier
8f675c37fc
Reduce usage of PCB IP version flag in UDP code. Maybe we can figure out a good way for dual-stack UDP when we manage to remove the flag (nearly) entirely from the code.
2016-02-20 20:54:58 +01:00
Dirk Ziegelmeier
5809b01388
Reduce usage of PCB IP version flag in raw and tcp code. Maybe we can figure out a good way for dual-stack UDP when we manage to remove the flag (nearly) entirely from the code.
2016-02-20 20:40:04 +01:00
Dirk Ziegelmeier
f104d68569
PPP: Init SNMP members of PPP netifs
2016-02-19 23:51:18 +01:00
Dirk Ziegelmeier
10edba936b
Fix tcp pcb access after it was freed in tcp.c - found by Coverity
2016-02-19 23:28:09 +01:00
Dirk Ziegelmeier
bbb5e99f25
Fix netconn access after it was freed in lwiperf - found by Coverity
2016-02-19 23:26:06 +01:00
Joel Cunningham
ea94549cb2
Optimize lwip_selscan()
...
This makes a couple of simple re-arrangements in lwip_selscan() that
should improve performance in the following ways:
1) The old code linearly walked all sockets to maxfd regardless of
whether they were set in the fd set. The process involved
acquiring sys arch protect, looking up the socket, and then
checking if the socket was present in any of the fd sets. On
systems with lots of sockets and a heavy SYS_ARCH_PROTECT
infrastructure (a mutex) this can result in a lot of extra work.
Now we skip this process for any fd that is not in the input sets
2) If the socket from tryget_socket() is NULL we no longer continue
and compare the input fd sets with a zeroed out set of events
3) We no longer need to zero out our event sets because they are
only accessed when tryget_socket() is successful
lwip_selscan() is called at most once per select call and sometimes up to three times
2016-02-18 13:17:45 -06:00
sg
9a97a80efc
Fixed bug #47154 lwip_netconn_do_writemore doesn't clear conn->write_offset on fatal/routing error.
2016-02-18 19:46:20 +01:00
goldsimon
e4cac595c2
Check TCP_SNDLOWAT for too high value (near u16_t overflow) - fixes bug #46948
2016-02-18 09:36:55 +01:00
Dirk Ziegelmeier
cf3d7def33
Let MIB compiler generate const structs, too (see last commit)
2016-02-17 08:14:16 +01:00
Dirk Ziegelmeier
24bc77a935
Found some struct instances that can be const
2016-02-16 22:31:59 +01:00
Joel Cunningham
9dd1c81d41
Update lwip_selscan documentation
...
lwip_selscan() documentation indicated exceptset is not used, which is no
longer accurate
2016-02-12 15:00:41 -06:00
Dirk Ziegelmeier
cddd3b552a
etharp.c: Make MAX_AGE of an ARP entry configurable
2016-02-11 09:38:17 +01:00
Dirk Ziegelmeier
5aa5563622
snmp_msg.c: Fix unchecked return value. Found by Coverity.
2016-02-10 21:57:57 +01:00
Dirk Ziegelmeier
09b850cc6f
snmp_threadsync.c: Fix ignored return value of mutex/semaphore creation. Found by Coverity.
2016-02-10 21:55:50 +01:00
Dirk Ziegelmeier
273d609bac
mem.c: Fix unintended sign extension (found by Coverity)
...
sign_extension: Suspicious implicit sign extension: count with type unsigned short (16 bits, unsigned) is promoted in count * size to type int (32 bits, signed), then sign-extended to type unsigned long (64 bits, unsigned). If count * size is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
2016-02-10 21:21:08 +01:00
Dirk Ziegelmeier
288b4564e4
DNS: Fix potential array out of bounds access. Variable nanswers may contain bogus values. (found by Coverity)
2016-02-10 20:41:31 +01:00
Dirk Ziegelmeier
78a36df901
Netconn: Fix potential NULL pointer dereference (found by Coverity)
2016-02-10 20:39:12 +01:00
Dirk Ziegelmeier
1c1587eef6
ICMP: Fix responses were always sent to default netif because of uninitialized source IP (found by Coverity)
2016-02-10 20:35:58 +01:00
Dirk Ziegelmeier
11b810721a
ICMP: Fix unused value in icmp_input (found by Coverity)
2016-02-10 20:34:44 +01:00
Dirk Ziegelmeier
e5eba61cf0
SNMP: Correctly name a global variable
2016-02-10 20:32:50 +01:00
Dirk Ziegelmeier
54a2c13b2e
SNMP: Fix compile in dual-stack configuration
2016-02-06 00:21:06 +01:00
Dirk Ziegelmeier
b2410e428a
SNMP: Remove comment about traps in README
2016-02-04 16:22:43 +01:00
Dirk Ziegelmeier
208f24a20c
SNMP: Add some comments in thread sync code
2016-02-04 16:20:46 +01:00
Dirk Ziegelmeier
8cd33a5e41
SNMP: Implement basic SNMPv1 traps; Remove IPv6 support in RAW API again until there is a clean solution for dual-stack UDP
2016-02-04 16:19:59 +01:00
Dirk Ziegelmeier
905a434179
snmp_pbuf_stream: Reduce code duplication. Most is already implemented in lwIP pbuf framework.
2016-02-03 08:39:41 +01:00
Dirk Ziegelmeier
222155d7e2
pbuf: Make pbuf_skip function public, so it can be used in SNMP code
2016-02-03 08:37:04 +01:00
Dirk Ziegelmeier
28549e35fe
SNMP: Update threadsync not to use mem_malloc - memory can be instantiated statically since it is only needed once per threadsync instance
2016-02-02 22:31:59 +01:00
Dirk Ziegelmeier
8f6cfa8769
Private mempools: Add missing include for LWIP_MEM_ALIGN_SIZE in memp_priv.h
2016-02-02 22:28:21 +01:00
Axel Lin
f411a34af5
stats: Add proper #if guard to prevent unused-variable warning for memp_names
...
The usages of memp_names are under either LWIP_DEBUG in stats_init,
or under LWIP_STATS_DISPLAY in stats_display_memp.
Fix below build warning:
lwip/src/core/stats.c:53:21: error: 'memp_names' defined but not used [-Werror=unused-variable]
static const char * memp_names[] = {
^
cc1: all warnings being treated as errors
Reported-by: David Fernandez
Fixes: 2f2a75a6d9fd ("stats: Move memp_names table out of stats_init/stats_display_memp functions")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-31 13:48:38 +01:00
Philipp Toelke
1de8d432d4
httpd: fix sending of data from send_headers
2016-01-29 09:26:29 +01:00
Axel Lin
515a4cad73
Clear addr_hint pointer after calling ip_output_if() in tcp_zero_window_probe()
...
This was missed in commit aa0e41c389
("task #12178 : hardware checksum capabilities can be configured per netif"),
fix it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-29 09:21:58 +01:00
Sylvain Rochet
4beacc4ca0
PPP, VJ, fixed TCP retransmission
...
We used to modify in place the packet payload during compression but TCP
stack requires that we don't change the packet payload, therefore we now
copy the whole packet before compression.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-24 20:07:54 +01:00
Sylvain Rochet
9c7231ee75
PPP, VJ, move pbuf length check so all TYPE_IP return value are within the same code block
...
Prepare for VJ packet copy, reorder a bit VJ compressor so all TYPE_IP
return value are within the same code block. We do that because we don't
need to copy the packet if we are not able to compress it.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-24 19:36:19 +01:00
Sylvain Rochet
e31902dc4c
PPP, prepare for chained compressors (e.g. VJ+MPPE) requiring packet copy
...
lwIP TCP stack requires that we don't change the packet payload in netif
output functions in order to resend the pbuf if we don't receive a TCP
ACK in time, therefore we copy the whole packet before compression or
encryption.
It gets tricky because we should keep track of whether we previously
copied the buffer in PPP output netif function in order to free the
previous pbuf if necessary, BUT the first pbuf passed to the netif
output function must not be freed.
The worst case is VJ compression followed by MPPE encryption, in this
case we should free the packet allocated by VJ compressor after MPPE
encryption and we should free the packet allocated by MPPE encrypter
after calling the PPP low level output function.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-24 17:48:57 +01:00
Sylvain Rochet
53853a25b0
PPP, report full packet size in VJ debug output
...
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-24 02:16:03 +01:00
Sylvain Rochet
858bce7b4e
PPP, VJ, code cleaning
...
Using lwIP types instead of u_ types.
Removed useless register modifier on variable.
Removed trailing spaces.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-24 01:38:26 +01:00
Sylvain Rochet
77d355560f
PPP, VJ, fix header offset calculation on LP64/ILP64 systems
...
long type on LP64/ILP64 systems (such as x86_64 on Linux) is 8 byte
long, this leads to wrong offsets in packets header calculation.
Fixed it by using u32_t lwIP type instead of long type.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-24 01:38:26 +01:00
Sylvain Rochet
733758a909
tcp: fixed TCPH_UNSET_FLAG macro
...
This macro is only used by VJ support in PPP and was always wrong since
its introduction in commit e4a6d199fe
. It's almost only used to clear
the PSH TCP flag when necessary. This flag was probably less common
about a decade ago so that would be the reason why it goes unnoticed for
so long.
Fixes: e4a6d199fe
"Merged from DEVEL into main tree."
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-24 01:38:26 +01:00
Dirk Ziegelmeier
90df2111b7
SNMP: Add missing closing braces in #ifdef __cplusplus case
2016-01-22 13:28:11 +01:00
Stephan Linz
31732631fc
PPP: CCP: add error debug messages for dropped packets due to missing transmit or receive CCP method
...
It might be difficult to investigate the reason of dropped packets when
there is no debug notification of what is happening, thus, add error
debug messages for dropped packets due to missing transmit or receive
CCP method.
Signed-off-by: Stephan Linz <linz@li-pro.net>
[gradator@gradator.net: improved messages]
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-20 21:55:37 +01:00
Sylvain Rochet
c4d78e6422
PPP, PPPoL2TP, fix double free of L2TP pcb in pppol2tp_create error path
...
ppp_free() calls the low level protocol destroy function, pppol2tp_destroy()
here, which freed the l2tp pcb, followed by pppol2tp_create which also freed
the pcb.
Fixing it by reordering the L2TP init so we don't have to call ppp_free()
anymore.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-20 21:12:37 +01:00
Wayne Uroda
52463fa25b
PPP, PPPoS, fix dereference of uninitialised pppos->in_head pointer
...
When I create a new PPP connection, I am seeing a hardfault (segfault)
coming from pbuf_free.
I traced the problem to an invalid in_head field of the pppos_pcb structure.
The field is invalid because the memory is never cleared to zero after the
pppos_pcb structure is created in pppos_create().
I was able to fix the issue by adding a memset after the memp_malloc call.
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-20 20:50:08 +01:00
Joel Cunningham
96373f6959
Define LWIP_CHKSUM_COPY_ALGORITHM when port provides LWIP_CHKSUM_COPY macro
...
When the port has LWIP_CHECKSUM_ON_COPY enabled and provides
a definition of LWIP_CHKSUM_COPY, the existing logic left
LWIP_CHKSUM_COPY_ALGORITHM undefined
In this case we want it to be defined to 0 since none of the copy
checksum algorithms provided are being used
This commit also introduces indentation matching LWIP_CHKSUM to
improve the readability of the code
2016-01-20 11:34:25 -06:00
Joel Cunningham
0a67c06b51
Fix type on snmp_set_test_ok to be snmp_err_t
...
This function was returning values from snmp_err_t but wasn't
upgraded to using the typedef after commit babce70
This resulted in compilation failure on MSVC 2013
2016-01-20 11:18:35 -06:00
Dirk Ziegelmeier
babce70c95
SNMP: Convert SNMP error #defines to an enum and fix type mismatches discovered by conversion; Convert SNMP_NEXT_OID_STATUS to an enum
2016-01-20 10:53:59 +01:00
Dirk Ziegelmeier
4cf509989f
SNMP: Fix variable naming in snmp_pbuf_stream
2016-01-20 10:53:15 +01:00
Sylvain Rochet
6185bf6f61
PPP: CCP: don't drop output packets if CCP negotiated that we don't compress on our side
...
CCP might negotiate to not compress if peers cannot agree on a
compressor, therefore if the null compressor is chosen we must pass
packets as is instead of dropping them.
Reported-by: Stephan Linz <linz@li-pro.net>
Fixes: 987f6237c4
"PPP, MPPE, drop input/output packets if we couldn't find the chosen decompressor/compressor"
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
2016-01-19 23:51:47 +01:00
Stephan Linz
2c31beb6e7
IPv4: fix some meaningless debug messages
...
Signed-off-by: Stephan Linz <linz@li-pro.net>
2016-01-18 21:34:13 +01:00
Stephan Linz
9f3270afaf
PPP: fix typo in debug message
...
Signed-off-by: Stephan Linz <linz@li-pro.net>
2016-01-18 21:33:17 +01:00
Axel Lin
fe2cfe2dba
raw: Fix build error
...
IP6_HLEN is only defined when LWIP_IPV6, IP_HLEN is only defined when LWIP_IPV4.
This fixes build error in !LWIP_IPV4 || !LWIP_IPV6 cases.
Fixes: f2c7e9c939
("raw: Remove unnecessary #if guard around PCB_ISIPV6() calls")
Reported-by: Erik Ekman
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-18 16:02:01 +01:00
Stephan Linz
80375e68dd
ip_frag: fix compiler warnings, unused variable
...
In case of IP_REASS_FREE_OLDEST==0, the argument clen of
ip_reass_enqueue_new_datagram() will not used and leads
the compiler to a warning.
Signed-off-by: Stephan Linz <linz@li-pro.net>
2016-01-18 11:55:54 +01:00
Stephan Linz
289d1dd7f3
slipif: fix several compiler warnings
...
- include new SNMP header
- add missing pointer type casting
- add missing default cases
- use const for all ip address types
- distinguish between IPv4 and IPv6 address types
Signed-off-by: Stephan Linz <linz@li-pro.net>
2016-01-18 11:55:32 +01:00
Axel Lin
f2c7e9c939
raw: Remove unnecessary #if guard around PCB_ISIPV6() calls
...
PCB_ISIPV6() macro is well defined for all cases (LWIP_IPV4 && LWIP_IPV6,
LWIP_IPV4 only and LWIP_IPV6 only), thus remove the unnecessary #if guard
around PCB_ISIPV6() calls.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-18 11:55:06 +01:00
Dirk Ziegelmeier
dc36dbac27
SNMP MIB2: Add unsupported snmpSilentDrops and snmpProxyDrops objects
2016-01-15 11:46:35 +01:00
Dirk Ziegelmeier
d9534325cf
SNTP: Add function to get operating mode
2016-01-15 11:41:12 +01:00
Axel Lin
c221361874
stats: Move memp_names table out of stats_init/stats_display_memp functions
...
This makes the code simpler with better readability.
Also make memp_names static because it's only referenced by stats.c.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-15 11:38:03 +01:00
Axel Lin
70ebeda7ed
memp: Simplify implementation of memp_overflow_check_all
...
We don't really care the order of overflow/underflow checking because if
any checking fails we got assertion.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-15 11:38:02 +01:00
Joel Cunningham
11faa8149e
Fix blocking close with LWIP_SO_SNDTIMEO
...
This fixes a bug in close when LWIP_SO_SNDTIMEO is enabled, but
the option is not in use on the socket
A simple mis-typed comparison against zero would cause the close_timeout
to get set to zero if conn->send_timeout was 0
The intended check was to over-ride the default close timeout if a
send timeout had been specified via SO_SNDTIMEO
2016-01-13 22:20:52 +01:00
Dirk Ziegelmeier
70487a43d4
Apply patch #8854 : dns: Simplify #ifdef guard around dns_gethostbyname_addrtype from Axel Lin
...
+ Minor compile fix from me
Patch makes the code a tiny bit less lightweight (add a parameter in dns_gethostbyname which is then not used in dns_gethostbyname_addrtype) but it makes the code more readable.
2016-01-13 19:52:08 +01:00
Axel Lin
a93ae2558f
tcp_rexmit_rto: Remove superfluous #if TCP_OVERSIZE guard
...
TCP_OVERSIZE_DBGCHECK already implies TCP_OVERSIZE is set.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-13 19:07:08 +01:00
Dirk Ziegelmeier
c2ba9129ad
SNMP: Fix InetAddress octet string encoding (length was missing)
2016-01-13 13:04:37 +01:00
Axel Lin
c2a74b767b
udp_bind: Omit checking for the same port if no port specified
...
No port specified means to use a random port.
udp_new_port() returns a new (free) local UDP port number on success.
So in this case we don't need iterating all lists to test if the port
number is used, udp_new_port() alreay ensures the port is not used.
Move the code checking for double bind and rebind of the same pcb earlier,
as this checking is necessary in all cases.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-13 09:05:36 +01:00
Dirk Ziegelmeier
123c8dbd6a
Fix bug #46837 Don't send dhcp_release message in dhcp_release function
2016-01-13 08:54:54 +01:00
Dirk Ziegelmeier
40ff62fa60
SNMP MIB Compiler: Update project settings, fix wrong output path in SharpSnmpLib
2016-01-12 08:40:12 +01:00
Dirk Ziegelmeier
84397ef013
SNMP MIB Compiler: Treat read-create nodes as read-only
2016-01-11 20:28:01 +01:00
Dirk Ziegelmeier
a2b7cec17b
SNMP MIB Compiler: Add example command line to compile UDP-MIB
2016-01-11 20:15:17 +01:00
Dirk Ziegelmeier
e80e7a10d4
SNMP MIB Compiler: Resolve MIB files in a case-insensitive way
2016-01-11 20:14:54 +01:00
Dirk Ziegelmeier
8c4d1909f4
SNMP MIB Compiler: Deal with multiple OID assignments in a MIB file
2016-01-11 19:45:57 +01:00
Dirk Ziegelmeier
bb8ecd7e08
SNMP: Add some basic MIBs
2016-01-11 19:45:25 +01:00
Axel Lin
9f3aab6a62
tcp_out: Use LWIP_DBG_LEVEL_SERIOUS instead of hard coded number
...
Trivial clean up to avoid using hard coded number.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-11 13:22:51 +01:00
Dirk Ziegelmeier
44256740bd
SNMP MIB Viewer: Adapt to changes in SNMP framework that were required to compile UDP-MIB and TCP-MIB
2016-01-11 12:25:47 +01:00
Axel Lin
156ad0dbf5
udp_bind: Fix the logic to check both pcbs have REUSEADDR set
...
The code for #if SO_REUSE case does not match the comment.
By default, we don't allow to bind to a port that any other udp
PCB is already bound to, unless *all* PCBs with that port have tha
REUSEADDR flag set.
Which means we want to omit checking for the same port if both pcbs
have REUSEADDR set. Fix the logic accordingly.
Fixes: d0348e0c60
("task #6995 : Implement SO_REUSEADDR (correctly)")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-11 12:19:13 +01:00
Axel Lin
5056d375f2
tcp_bind/tcp_connect: Omit checking for the same port if no port specified
...
No port specified means to use a random port.
tcp_new_port() returns a new (free) local TCP port number on success.
So in this case we don't need iterating all lists to test if the port
number is used, tcp_new_port() alreay ensures the port is not used.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-11 12:16:27 +01:00
Dirk Ziegelmeier
b68e801975
MIB compiler: Eliminate the need for a cast
2016-01-11 10:32:33 +01:00
Dirk Ziegelmeier
987f0e3016
Update SNMP README - add correct SharpSnmpLib reference
2016-01-11 10:26:37 +01:00
Dirk Ziegelmeier
713deba83f
SNMP MIB compiler: Add ability to generate UDP-MIB and TCP-MIB
2016-01-11 10:24:31 +01:00
Dirk Ziegelmeier
b9d0d80946
SNMP: Add more MIB compiler info
2016-01-09 14:35:51 +01:00
Dirk Ziegelmeier
84cd489d24
SNMP: Add MIB compiler (code generator)
2016-01-09 12:39:48 +01:00
Axel Lin
708beb4874
udp_bind: Allocate a random port earlier to correctly detect port conflict
...
Current code does not correctly detect port conflict if no port specified
because it checks ipcb->local_port == port before udp_new_port().
Fix it by allocating a random port earlier.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2016-01-09 10:14:09 +01:00
Dirk Ziegelmeier
4e8574bd23
SNMP: Table API cleanup
2016-01-07 09:53:25 +01:00
Dirk Ziegelmeier
fbdfba2509
SNMP: Found the correct cause of a memory leak
2016-01-07 09:52:13 +01:00
Dirk Ziegelmeier
e033866651
Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/lwip
2016-01-05 10:00:21 +01:00
Dirk Ziegelmeier
76094b8c7e
SNMP: SMEMCPY should only be used when size is known at compile time
2016-01-05 09:59:42 +01:00
Dirk Ziegelmeier
e336f877c2
Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/lwip
2016-01-04 21:27:39 +01:00