Commit Graph

3254 Commits

Author SHA1 Message Date
Sylvain Rochet
89d666155d PPP, MPPE, fixed mppe_rekey()
Oops, it was introduced when porting to PolarSSL ARC4.
2015-04-12 01:27:05 +02:00
Sylvain Rochet
4d6d65ee33 PPP, MPPE, fixed SHA1 padding
SHA1 padding is 40 byte, not 256 byte. Rekeying is done for each
packet in stateless mode, ensure speedness using static table for padding.
2015-04-11 23:57:47 +02:00
Sylvain Rochet
dcdb360a19 ip6_addr.c: fixed IPv6 ip6_addr_any value
0000:0000:0000:0000:0000:0000:0000:0000 instead of
0000:000a:0000:000b:0000:000c:0000:000d
2015-04-11 20:24:56 +02:00
Sylvain Rochet
8a73990f51 PPP, PPPoL2TP, improved pppol2tp_create() error path 2015-04-11 14:06:06 +02:00
Sylvain Rochet
efe229a54b PPP, PPPoL2TP, merged pppol2tp_input_ip() to pppol2tp_input()
We don't need anymore an input function for ip4 and an input function
for ip6, work to achieve that was partially done by ce7e31cd.
pppol2tp_input() is now only called by pppol2tp_input_ip(), finishing
dual stack support by merging pppol2tp_input_ip() into pppol2tp_input().
2015-04-11 13:56:41 +02:00
Sylvain Rochet
d6fdf7d4b1 PPP, PPPoL2TP, switched to dual stack IPv4/IPv6
Replaced ip4_addr_t to ip_addr_t in pppapi_pppol2tp_create() prototype,
now binding to UDPv6 or UDPv4 depending on the passed ip_addr_t type.

Removed pppol2tp_create_ip6() and pppapi_pppol2tp_create_ip6().
2015-04-11 13:15:06 +02:00
goldsimon
cf180b651b fixed unit tests after changing ip_addr_t 2015-04-10 08:51:06 +02:00
goldsimon
2e649e1843 Added IP_ADDR4()/IP_ADDR6() initializer macros that initialize ip_addr_t like their counterparts IP4_ADDR()/IP6_ADDR() 2015-04-10 08:49:32 +02:00
goldsimon
1985579148 fixed compiler warning (signed/unsigned comparison) introduced when fixing bug #44766 2015-04-10 07:46:31 +02:00
goldsimon
d31dbc6798 Fixed constant initializer problem in ip_addr_t by having ip6 first 2015-04-10 07:41:40 +02:00
Sylvain Rochet
ffd45a2261 PPP, added new build dependencies in init.c 2015-04-10 01:00:08 +02:00
Sylvain Rochet
135631d29d fixed some obvious compiler warnings
lwip/src/include/lwip/autoip.h:52:1: error: C++ style comments are not allowed in ISO C90 [-Werror]
 //#include "lwip/udp.h"

lwip/src/core/ipv4/autoip.c:70:1: error: C++ style comments are not allowed in ISO C90 [-Werror]
 //#include "lwip/udp.h"

lwip/src/include/lwip/api.h:239:25: error: declaration of ‘lev’ shadows a previous local [-Werror=shadow]
   SYS_ARCH_DECL_PROTECT(lev); \
2015-04-09 23:27:36 +02:00
sg
ce7e31cd04 task #12722 (improve IPv4/v6 address handling): renamed ip_addr_t to ip4_addr_t, renamed ipX_addr_t to ip_addr_t and added IP version;
ip_addr_t is used for all generic IP addresses for the API, ip(4/6)_addr_t are only used internally or when initializing netifs or when calling version-related functions
2015-04-09 22:21:15 +02:00
goldsimon
4ff1eb1890 fixed bug #44766 (LWIP_WND_SCALE: tcphdr->wnd was not scaled in two places) 2015-04-08 07:29:11 +02:00
goldsimon
7c47c917b5 dhcp: start discovery with short timeouts on network change, even if already discovering 2015-04-02 11:02:16 +02:00
Sylvain Rochet
7285459375 PPP, MPPE, exported MPPE functions 2015-03-29 12:19:33 +02:00
Sylvain Rochet
52b7ebd4e7 PPP, MPPE, fixed compiler warnings 2015-03-29 12:19:33 +02:00
Sylvain Rochet
ea6f624b58 PPP, MPPE. fixed port mistake on SHA1 computation 2015-03-29 12:19:33 +02:00
Sylvain Rochet
3cf3b78192 PPP, MPPE, commented-in Linux interface calls structure 2015-03-29 12:19:33 +02:00
Sylvain Rochet
cdc2d034de PPP, MPPE, temporarily replaced kzalloc() with malloc() 2015-03-29 12:19:32 +02:00
Sylvain Rochet
cd8a17d644 PPP, MPPE, removed useless Linux stuff 2015-03-29 12:19:32 +02:00
Sylvain Rochet
57e3e7f150 PPP, MPPE, improved SHA1 padding
Don't allocate 512 bytes of RAM for padding. Reduce overall padding
size to 64, therefore using stack instead of RAM or ROM.
2015-03-29 12:19:32 +02:00
Sylvain Rochet
c759639603 PPP, MPPE, removed "compression" stats
We don't need "compression" stats on a encryption protocols, as commented
"Since every frame grows by MPPE_OVHD + 2 bytes, this is always going
to look bad ... and the longer the link is up the worse it will get."
2015-03-29 12:19:32 +02:00
Sylvain Rochet
a6c101aeb8 PPP, MPPE, removed now useless setup_sg() function 2015-03-29 12:19:32 +02:00
Sylvain Rochet
7ea8a754c1 PPP, MPPE, using our ARC4 instead of Linux crypto ARC4 2015-03-29 12:19:32 +02:00
Sylvain Rochet
d5667343cb PPP, updated polarssl readme 2015-03-29 12:19:32 +02:00
Sylvain Rochet
0bfe435c4f PPP, MPPE, updated polarssl ARC4 for lwIP 2015-03-29 12:19:32 +02:00
Sylvain Rochet
cd39843c75 PPP, MPPE, import unmodified ARC4 from polarssl 2015-03-29 12:19:32 +02:00
Sylvain Rochet
f9ae65acd8 PPP, MPPE, added build macro if MPPE is not enabled 2015-03-29 12:19:32 +02:00
Sylvain Rochet
cfd930cae7 PPP, MPPE, using our SHA1 instead of Linux crypto sha1 2015-03-29 12:19:32 +02:00
Sylvain Rochet
0b7e3610ac PPP, MPPE, using lwIP ERR_BUF instead of Linux DECOMP_ERROR error type 2015-03-29 12:19:32 +02:00
Sylvain Rochet
10946e7669 PPP, MPPE, removed a bit more Linux stuff 2015-03-29 12:19:32 +02:00
Sylvain Rochet
2dcd8c2729 PPP, MPPE, removed include we don't have 2015-03-29 12:19:32 +02:00
Sylvain Rochet
dcde1c2a8f PPP, CCP, added missing defines from linux/ppp-comp.h to ccp.h 2015-03-29 12:19:32 +02:00
Sylvain Rochet
0810384555 PPP, MPPE, replaced printk() to PPPDEBUG() 2015-03-29 12:19:32 +02:00
Sylvain Rochet
434fb1e0da PPP, MPPE, fixed path to mppe.h 2015-03-29 12:19:32 +02:00
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