Commit Graph

3418 Commits

Author SHA1 Message Date
Sylvain Rochet
435a0b98ac PPP, MPPE, cleaning license notice
We only need to keep the BSD license part in lwIP, cleaning the part which
is only relevant for the Linux kernel.
2015-03-29 12:19:32 +02:00
Sylvain Rochet
05eda236cc PPP, MPPE, import unmodified Linux MPPE encoder/decoder
This file, which is an unmodified copy of Linux MPPE encoder/decoder, is
licensed under a dual License BSD/GPL model. It was previously in the
pppd source tree and it was removed because this is merged into the Linux
kernel.
2015-03-29 12:19:32 +02:00
goldsimon
c998faeeab fixed bug #44649 lwip_socket_drop_registered_memberships 2015-03-27 13:18:34 +01:00
Sylvain Rochet
f967933e8b PPP, PPPoS, protect open flag in connect() and listen()
Protect open flag in connect() and listen(), this is a bitfield, it might
not be set atomically on some targets.
2015-03-26 23:30:18 +01:00
Sylvain Rochet
8862a1ac8f PPP, MPPE, ccp_options->mppe is a bitfield of MPPE_OPT_* and not a boolean, fixed
This is actually wrong as well in PPPd, oops.
2015-03-25 00:09:37 +01:00
Sylvain Rochet
ad56a115be PPP, CCP, moved ccp_test() from ccp_addci() to ccp_resetci()
We don't need to test our available compression protocols that much, we know
what we are going to be able to use in embedded. Even PPPd don't need that.

Checking only in ccp_resetci() is enough, this way we know our cilen size
before ccp_addci() is called. PPPd is designed that *_addci() can use less
bytes than it previously asked in *_cilen(), we prefer to avoid that here.

We actually don't need at all ccp_test() calls, we know what we are
able to support at compile time, we don't need to ask the kernel like
PPPd does. This is just the first step in ccp_test() removal.
2015-03-24 23:37:56 +01:00
Sylvain Rochet
c8ed013600 PPP, FSM, added assert to easily track cilen size mismatch
See c49fc8d for such a problem which ends up with heap corruption.
2015-03-24 23:10:58 +01:00
Sylvain Rochet
c49fc8db72 PPP, CCP: Fix ccp_cilen returning size if both deflate_correct and deflate_draft are enabled
This fixes a bug returning 4 byte less than necessary for the addci buffer
if both deflate_correct and deflate_draft are enabled.
2015-03-24 21:38:33 +01:00
sg
93fa268db1 used ip6_addr_t instead of struct ip6_addr, fix const'ness in ip6_route parameters 2015-03-24 21:30:22 +01:00
sg
521c92764d loopif is not required for loopback traffic any more but passed through any netif (ENABLE_LOOPBACK has to be enabled) (task #13515) 2015-03-24 21:22:19 +01:00
sg
71d121fab2 Added input & route hooks for IPv6 to stay in line with IPv4 2015-03-24 20:33:47 +01:00
sg
86970a01d7 etharp: reduce ARP aging timeout from 20 minutes to 5 minutes, since this is a time obviously used in some switches as MAC learning table timeout. Having our ARP timeout higher than this can lead to sending unicast packets to multiple network segments. 2015-03-24 20:04:18 +01:00
Sylvain Rochet
210496f0ca PPP, IPV6, correct fix for IPV6CP_COMP disabling 2015-03-23 23:48:00 +01:00
sg
2eb0386c2a fixed bug #36017 ARP might not support duplicate addresses on multiple netifs (tried to correctly handle duplicate AutoIP addresses on multiple netifs, but only if explicitly enabled via ETHARP_TABLE_MATCH_NETIF==1) 2015-03-23 22:04:57 +01:00
sg
440c99100b fixed bug #34617: Stable etharp entries that are about to expire are now refreshed using unicast to prevent unnecessary broadcast.
Only if no answer is received after 15 seconds, broadcast is used.
2015-03-23 21:38:19 +01:00
sg
33d5e646e5 fixed bug #41318 (Bad memory ref in tcp_input() after tcp_close()) 2015-03-21 21:19:10 +01:00
sg
c00a62d37f fixed bug #38468 (tcp_sent() not called on half-open connection for data ACKed with the same ack as FIN) 2015-03-21 20:56:42 +01:00
Sylvain Rochet
17486408b4 PPP, IPV6, fixed build if VJ support is disabled 2015-03-21 20:41:03 +01:00
Sylvain Rochet
c17594c1d0 PPP, CORE, don't build get_loop_output() if demand support (not supported) is not enabled 2015-03-21 20:12:14 +01:00
sg
4463239d6e fixed bug #38204 (DHCP lease time not handled correctly) 2015-03-21 10:09:31 +01:00
sg
45d82c8d99 dhcp.c: removed dead code (#if 0) 2015-03-20 21:03:19 +01:00
sg
3e302e8683 fixed bug #38714 (Missing option and client address in DHCPRELEASE message) 2015-03-20 21:02:41 +01:00
sg
d6620f0f3a fixed bug #38203 (DHCP options are not recorded in all DHCP ack messages) 2015-03-20 20:29:04 +01:00
Sylvain Rochet
f7a5b71dba nd6: fixed compiler warnings
nd6.c: In function ‘nd6_send_rs’:
nd6.c:997:52: warning: suggest parentheses around ‘+’ inside ‘<<’ [-Wparentheses]
   p = pbuf_alloc(PBUF_IP, sizeof(struct rs_header) + lladdr_opt_len << 3, PBUF_RAM);
                                                    ^
nd6.c:998:58: warning: suggest parentheses around ‘+’ inside ‘<<’ [-Wparentheses]
   if ((p == NULL) || (p->len < (sizeof(struct rs_header) + lladdr_opt_len << 3))) {
2015-03-20 20:11:59 +01:00
Ivan Delamer
a4d14fc987 fix bug #44586: nd6_send_rs() pbuf size error 2015-03-20 09:04:22 -06:00
Sylvain Rochet
c8587e1242 tcp_in: typo fix. Fixes bug #4458944589. 2015-03-20 13:22:47 +01:00
Sylvain Rochet
4e62a88870 PPP, PPPoL2TP, fixed build with IPv6 enabled 2015-03-20 09:48:40 +01:00
Clint Sbisa
32f6e7e231 tcp: Fix ooseq processing when seqno is near 2^32
An edge case in out-of-sequence TCP packet processing did not use the
appropriate macro to check if the sender overran the recieve window.

Consequently, this case sometimes evaluated to true when it shouldn't, which
resulted in various bad behavior, including trying to resize a TCP buffer to 4
gigabytes.
2015-03-20 08:32:14 +01:00
goldsimon
94f7bcef67 Fixed tcp unit tests after changing routing to check for link up 2015-03-20 08:31:39 +01:00
Sylvain Rochet
36e90a1bd5 PPP, CCP, add dummy ccp_ functions in ppp.c so it builds if CCP_SUPPORT is set 2015-03-20 00:37:34 +01:00
Sylvain Rochet
9fbe900949 PPP, MPPE, replaced #ifdef MPPE to #if MPPE_SUPPORT 2015-03-20 00:20:12 +01:00
Sylvain Rochet
73f1511ac2 PPP, CORE, removed auth fields from struct ppp_pcb if auth is disabled 2015-03-20 00:00:46 +01:00
Sylvain Rochet
5937932370 PPP, CCP, various fix if MPPE is enabled 2015-03-19 21:45:19 +01:00
Sylvain Rochet
794c93b540 PPP, CCP, various compiler warnings fix 2015-03-19 21:45:19 +01:00
Sylvain Rochet
b92ac33022 PPP, CCP, updated to our utils.c function name 2015-03-19 21:45:19 +01:00
Sylvain Rochet
90bbcbf994 PPP, CCP, updated ccp_printpkt() prototype to match other *_printpkt() 2015-03-19 21:45:19 +01:00
Sylvain Rochet
151995f88c PPP, CCP, updated ANY_COMPRESS() to use ccp_options* 2015-03-19 21:45:19 +01:00
Sylvain Rochet
611b3c4c2c PPP, CCP, commented-in unused global variables used for options 2015-03-19 21:45:19 +01:00
Sylvain Rochet
2a6104ab17 PPP, CCP, added ccp.h in ppp.h 2015-03-19 21:45:19 +01:00
Sylvain Rochet
1dcd4cc220 PPP, CCP, reworked to our ppp_pcb* pointer and ppp_pcb->ccp* data field 2015-03-19 21:45:19 +01:00
Sylvain Rochet
7174578ac3 PPP, CCP, moved CCP global variables to ppp_pcb (ppp.h) 2015-03-19 21:45:19 +01:00
Sylvain Rochet
10d09049bb PPP, CCP, replaced bool to unsigned int in struct ccp_options 2015-03-19 21:45:19 +01:00
Sylvain Rochet
98c6a4e86e PPP, CCP, updated FSM state with our FSM state define PPP_FSM_x 2015-03-19 21:45:19 +01:00
Sylvain Rochet
3bd52891c5 PPP, CCP, commented-in unused PPP config file parsing 2015-03-19 21:45:19 +01:00
Sylvain Rochet
ee752ab1ce PPP, PPPoS, renamed PPP_INPROC_MULTITHREADED to PPP_INPROC_IRQ_SAFE
Follow-up of the #44565 bug fix, renamed the misnamed
PPP_INPROC_MULTITHREADED to PPP_INPROC_IRQ_SAFE because it is
IRQ safe but not thread safe.

Updated PPP documentation which now clearly state when and how
this feature can be used.
2015-03-19 21:43:55 +01:00
sg
9eb900c448 fixed race conditions in assigning netconn->last_err (fixed bugs #38121 and #37676) 2015-03-19 21:20:29 +01:00
Sylvain Rochet
0e919d25e9 PPP, PPPoS, improved tcpip input path, fixed bug #44565
New input type TCPIP_MSG_INPKT_PPPOS. Removed the netif input pointer usage
which was actually broken by design.

Fixed bug #44565.
2015-03-19 21:04:21 +01:00
Sylvain Rochet
4ed34d2c6f PPP, PPPoL2TP, fixed build without IPv6 enabled 2015-03-19 20:43:04 +01:00
Sylvain Rochet
c893b44da2 PPP, PPPoS, struct pbuf *n and u8_t *cur are now unused, removed 2015-03-19 20:29:26 +01:00
Ivan Delamer
d06a736f41 fix bug #44578: Build fails for IPv6-only configuration 2015-03-19 10:08:49 -06:00