Commit Graph

3479 Commits

Author SHA1 Message Date
goldsimon
fbadb8354f fixed const'ness of syscontact/sysname/syslocation 2015-04-22 16:06:39 +02:00
goldsimon
02dee05c16 Fixed const'ness in snmp (design of sys contact/name/location and snmpenableauthentraps is broken!) 2015-04-22 15:39:56 +02:00
goldsimon
b16316ae37 fixed more (tiny) warnings... 2015-04-22 14:56:58 +02:00
goldsimon
f5077dc982 fixed some more missing casts... 2015-04-22 14:18:54 +02:00
goldsimon
634c438b50 sockets.c: added missing casts after changing storage type of 'err' member in sockets 2015-04-22 13:52:21 +02:00
goldsimon
f468c492b9 fixed missing casts found with msvc /Wall 2015-04-22 13:38:10 +02:00
goldsimon
5410838793 igmp.c: fixed -Waddress, removed dead code 2015-04-22 12:50:26 +02:00
goldsimon
91c2618f21 fixed typo in sockets.h 2015-04-22 12:50:13 +02:00
goldsimon
beabd3c6b7 Added some macros with extension "_val" that work on actual instances and leave away the "if != NULL" check to get rid of gcc "-Waddress" warnings in the core code at least (I might not have caught all of them, yet) 2015-04-22 12:43:03 +02:00
goldsimon
a81c7bf04b fixed compiling icmp.c (variable has to be declared at the beginning of a scope) 2015-04-22 11:29:35 +02:00
goldsimon
a6c3bb4c6d revert accidentally committed snmp header files 2015-04-22 10:54:07 +02:00
goldsimon
902d190a11 Many const fixes throughout the stack (although these are not all, yet) 2015-04-22 10:29:43 +02:00
goldsimon
0142f113a3 fixed compiling netdb.c after LWIP_IPV4 changes 2015-04-22 09:17:31 +02:00
goldsimon
fe195a86cd dhcp: move declaration of "extern void dhcp_set_ntp_servers()" from dhcp.c to dhcp.h to make the function prototype known to implementers 2015-04-22 09:17:06 +02:00
goldsimon
11845cedd6 Added version-independent ip_addr_islinklocal() 2015-04-22 09:16:05 +02:00
Sylvain Rochet
5e43e2d333 PPP, L2TP, minor fixes
Check tot_len for ZLB instead of len, it might happens we are just
between 2 pbuf, although almost impossible.

Check buffer is at least 2 byte long before checking address & flags
header.
2015-04-22 00:50:08 +02:00
Sylvain Rochet
15cc47334e PPP, don't assert if we receive a too short packet in ppp_input(), just drop
We might actually receive too short packets through PPPoE or PPPoL2TP,
don't assert on unusal packets, just drop them.
2015-04-22 00:31:14 +02:00
Sylvain Rochet
5989c1883e PPP, removed useless padding in bitfields
Most of them were wrong actually. We have to use unsigned int because
C90 only allows int types for bitfields, so we are stuck to 32-bit
bitfields in most cases.
2015-04-21 22:43:53 +02:00
Sylvain Rochet
632de523de Fixed PBUF_LINK_ENCAPSULATION_HLEN support
PBUF_LINK_ENCAPSULATION_HLEN support was introduced by 6ef7563f and
missed the fact that header size calculation/reservation using
computation like PBUF_LINK_HLEN + PBUF_IP_HLEN + ... are used all over
the source code. Hopefully fixed all of them.
2015-04-20 23:43:33 +02:00
Sylvain Rochet
2db7513590 PPP, VJ, improved opt.h comment about VJ 2015-04-20 21:14:05 +02:00
Sylvain Rochet
ced24f9215 PPP, MPPE, drop unencrypted input packet if MPPE is required 2015-04-20 21:13:34 +02:00
Sylvain Rochet
b302cad46d PPP, VJ, CCP: rework to fix protocol order
We need to do VJ compression before CCP/MPPE compression and VJ
decompression after CCP/MPPE decompression. This leads to a massive
rewrite of how we currently handled VJ only in the PPPoS lower protocol
handler.

Moved VJ structures from pppos to ppp_pcb because we need them back in
PPP core. This is a bit unfortunate because that's not necessary for
PPPoE or PPPoL2TP, but, hey!. Fixed CCP+MPPE+VJ order.
2015-04-20 00:10:35 +02:00
Sylvain Rochet
33838b8c1c PPP, MPPE, compile-out unused mppe_incomp() function 2015-04-19 22:06:59 +02:00
Sylvain Rochet
42fb74ce22 PPP, CCP, MPPE, handle CCP Reset-Request and Reset-Ack for MPPE 2015-04-19 22:01:58 +02:00
Sylvain Rochet
74670ec07f PPP, MPPE, MPPE also requires MSCHAP support (therefore CHAP support as well) 2015-04-19 17:06:23 +02:00
Sylvain Rochet
3450a78992 PPP, change ppp_write() return type from int to err_t
ppp_write() callback returns err_t, makes ppp_write() consistent with
the callback it is calling.
2015-04-19 16:34:34 +02:00
Sylvain Rochet
f4ef6180b8 PPP, MPPE: allow users to enable CCP and MPPE support in opt.h
We are new ready to process CCP and MPPE packets, allow lwIP users to benefit
from those features.
2015-04-19 16:28:48 +02:00
Sylvain Rochet
f0c25aaa60 PPP, MSCHAP, fixed compiler warnings if MPPE support is disabled 2015-04-19 16:28:11 +02:00
Sylvain Rochet
0f63c1ef8f PPP, CORE, reworked ppp_netif_output* functions to process CCP on all protocols
Both IPv4 and IPv6 should be proccessed by CCP, reworked ppp_netif_output*
in a generic way for CCP.
2015-04-19 16:22:20 +02:00
Sylvain Rochet
b27966860e PPP, CCP, MPPE: added packet plumbing in ppp.c to process MPPE packets 2015-04-19 15:52:46 +02:00
Sylvain Rochet
51566d43bd PPP, normalized debug messages 2015-04-19 14:24:30 +02:00
Sylvain Rochet
71d085bd13 PPP, CCP, added data packet configuration in ppp_pcb 2015-04-19 14:17:34 +02:00
Sylvain Rochet
ffb10e7aac PPP, CCP, added receive and transmit chosen protocols in ccp_flags_set() (renamed ccp_set())
We need to know which methods were chosen when CCP is up, this used to be done
using ccp_test() which we are in the process of removing.

Using non-existing method 0 instead of -1 in CCP for unset method, allowing
type change from s16_t to u8_t for method.
2015-04-19 13:51:35 +02:00
sg
a5503df32b Fixed typo in dchp_inform (state is named DHCP_INFORMING, not DHCP_INFORM) 2015-04-19 12:30:20 +02:00
Sylvain Rochet
c8db96705f PPP, MPPE, close current session using lcp_close() if something went wrong 2015-04-19 02:27:40 +02:00
Sylvain Rochet
f94efab6c3 PPP, CCP, added MPPE user configuration flags 2015-04-19 02:17:43 +02:00
Sylvain Rochet
4c0af0f79e PPP, MPPE, reworked MPPE debug, using ppp_pcb metadata 2015-04-19 01:49:04 +02:00
Sylvain Rochet
fc7e327d19 PPP, MSCHAP, CCP, MPPE: reworked key passing from CCP to MPPE
Removed mutiple copies of keys by pre-setting MPPE keys during MSCHAP
negotiation.

Improved MPPE init so we don't need to pass a buffer formatted in a
special way to MPPE, this is necessary for pppd to talk to the kernel,
we don't need that here.
2015-04-19 01:20:43 +02:00
Sylvain Rochet
045f44c7f9 PPP, MSCHAP, merged mppe_set_keys() to Set_Start_Key(), merged mppe_set_keys2() to SetMasterKeys() 2015-04-19 00:26:25 +02:00
Sylvain Rochet
867d13b007 PPP, CCP, MPPE: calling mppe_init() in ccp.c instead of using ccp_test()
We don't need this ccp_test() stuff which is used to test if kernel have
the ability to process MPPE packets. Reworked MPPE so we don't need it.
2015-04-18 23:51:10 +02:00
Sylvain Rochet
40991b93a2 PPP, CCP, reworked ppp_pcb ccp_localstate and all_rejected fields 2015-04-18 19:47:21 +02:00
Sylvain Rochet
949d76b328 PPP, MSCHAP: ensure magic tables are not copied and initialized on stack 2015-04-18 19:14:39 +02:00
Sylvain Rochet
210a2ccfdf PPP, MSCHAP, MPPE: shared identical mppe_sha1_pad* between MSCHAP and MPPE 2015-04-18 18:51:45 +02:00
Sylvain Rochet
3862aad2f7 PPP, MSCHAP, reworked local functions and constants
MSCHAP was written the old-way, with all functions declared non static in
header, independent of their local or global scope status. Same for local
constants. Reworked in a more mordern way.
2015-04-18 17:56:35 +02:00
Sylvain Rochet
2a005c2f11 PPP, MPPE, moved MPPE global variables from MSCHAP to ppp_pcb 2015-04-18 17:41:44 +02:00
Sylvain Rochet
ab46ac9bd8 PPP, CHAP, reworked to pass ppp_pcb pointer to CHAP childs (MD5, MSCHAP, MSCHAPv2)
We are going to need ppp_pcb* in MSCHAP and MSCHAPv2 for MPPE for
int mppe_keys_set, u_char mppe_send_key and u_char mppe_recv_key
which are currently global variable which must be moved to ppp_pcb.
2015-04-18 17:29:55 +02:00
Sylvain Rochet
c51ed84fd8 PPP, MPPE, added ppp_mppe_state comp and decomp to ppp.h 2015-04-18 16:13:44 +02:00
Sylvain Rochet
74054ea907 PPP, MPPE, struct ppp_mppe_state to typedef
We usually handle "typedefed" struct in lwIP, and I agree this is a cleaner
approach. Replaced struct ppp_mppe_state to ppp_mppe_state.
2015-04-18 14:54:25 +02:00
Sylvain Rochet
f79bc03360 PPP, MPPE, optimized struct ppp_mppe_state size 2015-04-18 13:41:38 +02:00
Sylvain Rochet
b553df860c PPP, CCP, deflate, BSD compress, predictor 1 & 2 are now optional at compile time 2015-04-18 02:02:00 +02:00