History log of /seL4-camkes-master/projects/lwip/src/netif/ppp/eap.c
Revision Date Author Comments
# ab989c35 12-May-2016 Axel Lin <axel.lin@ingics.com>

PPP: Use LWIP_ARRAYSIZE at appropriate places

Use LWIP_ARRAYSIZE to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Sylvain Rochet <gradator@gradator.net>
[Sylvain Rochet <gradator@gradator.net>: added missing casts]
Signed-off-by: Sylvain Rochet <gradator@gradator.net>


# 33fc20cc 08-May-2016 Sylvain Rochet <gradator@gradator.net>

PPP: use mbed TLS sanitize functions if available

mbed TLS offers sanitize functions to zero-ise memory containing
cryptographic keys, use them if built with external mbed TLS library.


# 3417a02b 08-May-2016 Sylvain Rochet <gradator@gradator.net>

PPP: add a function map for hashes and ciphers to prepare for mbed TLS support

Unfortunately, all functions were renamed when PolarSSL was renamed to
mbed TLS, breaking the API. In order to continue supporting our embedded
PolarSSL copy while allowing our users to use mbed TLS, we need a function
map to deal with the API break.

This commit add a function map for all hashes and ciphers we are currently
using.


# 76d25bef 21-Apr-2016 Dirk Ziegelmeier <dirk@ziegelmeier.net>

Work on task #13907 PPP cleanups: Move PPP options from opt.h to dedicated ppp_opts.h file


# 83cddd89 18-Sep-2015 Sylvain Rochet <gradator@gradator.net>

PPP: more const and mixed u_char/char types fixes


# 41ee45d9 09-Sep-2015 Sylvain Rochet <gradator@gradator.net>

PPP: fix constness in PPP related files when PRINTPKT_SUPPORT is enabled


# a24f4421 30-Aug-2015 Sylvain Rochet <gradator@gradator.net>

PPP, magic, using magic_random_bytes() for CHAP/MSCHAP/EAP instead of for-loop byte where possible


# 091c6a3b 29-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, cleanup unused/redefined/useless limits in ppp_impl.h


# 737a6921 23-Apr-2015 Sylvain Rochet <gradator@gradator.net>

PPP, place print packet debug codenames in ROM


# 71b213df 28-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, EAP: using MAXNAMELEN define instead of hardcoded 256 size for rhostname


# 7f3913ff 28-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, EAP: removed malloc() and free()

Replaced pcb->eap.es_{client,server}.ea_peer pointer to a char table,
replaced strdup() with MEMCPY, etc.


# d884034c 28-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, replaced drand48() with magic_pow()


# 5e73068e 18-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, Removed (*datainput) from struct protent if not used

Data input is only used by CCP and ECP, which are not supported at this time,
remove this entry from struct protent to save some flash.


# b71d9ce3 18-Feb-2015 Sylvain Rochet <gradator@gradator.net>

PPP, CORE, Removed useless enabled_flag from struct protent

Our struct protent are const everywhere to save RAM, enable/disable
flag on a const struct is useless, saving some flash, removed.


# 482a18e6 24-Dec-2014 Sylvain Rochet <gradator@gradator.net>

PPP, added const modifier on auth strings


# 2b3e0201 24-Dec-2014 Sylvain Rochet <gradator@gradator.net>

PPP, fixed some compiler warnings

Using -Wall -pedantic -Wparentheses -Wsequence-point
-Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith
-Wbad-function-cast -Wc++-compat -Wwrite-strings -Wold-style-definition
-Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address


# da19974e 12-Oct-2014 Sylvain Rochet <gradator@gradator.net>

fixed bug #43235, cleared compiler warnings when using gcc with -Wextra option


# 2350d941 26-Apr-2013 Sylvain Rochet <gradator@gradator.net>

PPP, added PPP_USE_PBUF_RAM compile time option

pbuf_type PPP is using for LCP, PAP, CHAP, EAP, IPCP and IP6CP packets.

Memory allocated must be single buffered for PPP to works, it requires pbuf
that are not going to be chained when allocated. This requires setting
PBUF_POOL_BUFSIZE to at least 512 bytes, which is quite huge for small systems.

Setting PPP_USE_PBUF_RAM to 1 makes PPP use memory from heap where continuous
buffers are required, allowing you to use a smaller PBUF_POOL_BUFSIZE.


# 6764957d 09-Dec-2012 Sylvain Rochet <gradator@gradator.net>

PPP, moved EAP configuration to ppp_settings struct


# 9e4aa792 13-Oct-2012 Sylvain Rochet <gradator@gradator.net>

PPP, adding const pragma to struct protent, saving about 200 bytes in .data segment


# e81f0925 27-Sep-2012 Sylvain Rochet <gradator@gradator.net>

PPP, changed all the code enclosed between PPP_SERVER #if macro to our PPP PCB structure, making it easier to support PPP server in the future


# 045ee534 26-Aug-2012 Sylvain Rochet <gradator@gradator.net>

PPP, using PBUF_POOL instead of PBUF_RAM pbufs for PPP negociation packets

PPP stack does not handle chained pbuf, but PPP negociation packets
are at most ~40 bytes long, so we are only checking if the payload
can fit into the allocated pbuf (p->tot_len == p->len).


# e9b29184 21-Aug-2012 Sylvain Rochet <gradator@gradator.net>

PPP, renamed all functions using common names in utils.c that can conflict with lwIP user code during link operation


# 1ddebcc8 18-Aug-2012 Sylvain Rochet <gradator@gradator.net>

Moved PPP headers into include/netif/ppp/, fixing bug #37040.


# 90faecd8 03-Jul-2012 Sylvain Rochet <gradator@gradator.net>

replaced u_int{8,16,32}_t to lwIP u{8,16,32}_t types

added padding to compiler generated bitfield, this is seen as best practice,
maybe it helps buggy compilers


# 9b7860d6 22-Jun-2012 Sylvain Rochet <gradator@gradator.net>

merged ppp_write and ppp_write_pbuf


# 2aa9a66c 19-Jun-2012 Sylvain Rochet <gradator@gradator.net>

don't duplicate user and password anymore, anyway, the PPP user will have them already allocated as static strings or from configuration flash/file


# ff2a7370 19-Jun-2012 Sylvain Rochet <gradator@gradator.net>

ppp_settings.remote_name is now a compile time option


# 1b586b69 18-Jun-2012 Sylvain Rochet <gradator@gradator.net>

do not allocated pbuf of more than pcb->peer_mru instead of PPP_MRU, to save some memory


# 4a7f2ffc 17-Jun-2012 Sylvain Rochet <gradator@gradator.net>

pcb->outpacket_buf replaced by pbuf everywhere it was used


# 4404ef02 16-Jun-2012 Sylvain Rochet <gradator@gradator.net>

prevent conflict with existing (md4|md5|sha1|des) object file if polarssl is already used elsewhere in the project


# 82a4d4ec 15-Jun-2012 Sylvain Rochet <gradator@gradator.net>

LCP global variables moved to ppp_pcb as well as input/output buffers


# 4a8ff6d8 15-Jun-2012 Sylvain Rochet <gradator@gradator.net>

protent prototype switched from unit to ppp_pcb


# 2deb13df 14-Jun-2012 Sylvain Rochet <gradator@gradator.net>

EAP is now using ppp_pcb as well


# 844f5e5a 13-Jun-2012 Sylvain Rochet <gradator@gradator.net>

moved auth.c global variables to ppp_pcb


# 51bfac71 13-Jun-2012 Sylvain Rochet <gradator@gradator.net>

auth.c functions now use ppp_pcb* as first argument


# 6e2722a6 10-Jun-2012 Sylvain Rochet <gradator@gradator.net>

started the unit to ppp_pcb replacement


# 444646b6 09-Jun-2012 Sylvain Rochet <gradator@gradator.net>

renamed ppp_control to ppp_pcb, replaced unit number to ppp_pcb in all ppp.h declared functions


# 8bd508a7 09-Jun-2012 Sylvain Rochet <gradator@gradator.net>

moved ppp_settings to ppp_control, improved PPP API to really allow multiple PPP sessions


# 6b8c78ba 09-Jun-2012 Sylvain Rochet <gradator@gradator.net>

moved remote_name and explicit_remote global variable to ppp_settings


# e5355cc4 07-Jun-2012 Sylvain Rochet <gradator@gradator.net>

PPP server support is now optional (disabled by default, not working until PPP have a "listen" support)


# 093c7b43 03-Jun-2012 Sylvain Rochet <gradator@gradator.net>

cleaned depreacted __P() and __V() macros, removed the legacy varargs.h header


# 3bad9ff5 03-Jun-2012 Sylvain Rochet <gradator@gradator.net>

ppp_impl.h is back!


# 9c35403b 02-Jun-2012 Sylvain Rochet <gradator@gradator.net>

clarified a bit more ppp.[ch]


# b5b075eb 02-Jun-2012 Sylvain Rochet <gradator@gradator.net>

demystified a bit the PPP impl, renamed output() to ppp_output() to prevent conflict


# 86ebc8e4 02-Jun-2012 Sylvain Rochet <gradator@gradator.net>

removed pppd.h and ppp.c, renamed pppmy.c to ppp.c and pppmy.h to ppp.h


# 7f9fea18 02-Jun-2012 Sylvain Rochet <gradator@gradator.net>

added pppmy.h in all .c files to easily find conflicts


# 6c908ac7 01-Jun-2012 Sylvain Rochet <gradator@gradator.net>

removed more protent fields only used by print packets functions


# 2c4bd716 01-Jun-2012 Sylvain Rochet <gradator@gradator.net>

print packet functions are now optional


# 8b866bea 01-Jun-2012 Sylvain Rochet <gradator@gradator.net>

demand support is now a compile-time option

Obviously, it requires some wiring to know if there is new activity
on a not-yet established PPP interface with the default route
already set.

I don't think any lwIP user will ever need that, all should know
when to bring the link up and down.


# ee5fca7a 01-Jun-2012 Sylvain Rochet <gradator@gradator.net>

removed pathnames.h and pidfile support


# 7736cdae 22-May-2012 Sylvain Rochet <gradator@gradator.net>

replaced BCOPY to lwip-MEMCPY


# 42827cde 22-May-2012 Sylvain Rochet <gradator@gradator.net>

more and more ppp options removal


# b88dad40 21-May-2012 Sylvain Rochet <gradator@gradator.net>

disabled almost all PPP options strings and support as well as useless file-based auth code


# 02890559 21-May-2012 Sylvain Rochet <gradator@gradator.net>

Revert "Revert "Added PolarSSL DES library, which is necessary for MSCHAP.""

This reverts commit a820f32ec936a1a699ef76adb3fa8ea0915fc152.


# 83a48daf 21-May-2012 Sylvain Rochet <gradator@gradator.net>

Revert "Revert "Replaced md4/md5/sha1 implementations to PolarSSL ones""

This reverts commit ca2fd867b8e6b92ab4338c504e5b9567ab76e414.


# 795d5807 20-May-2012 Sylvain Rochet <gradator@gradator.net>

EAP support is now optional


# 7d43f4a1 20-May-2012 Sylvain Rochet <gradator@gradator.net>

removed useless system header from EAP


# ca2fd867 20-May-2012 Sylvain Rochet <gradator@gradator.net>

Revert "Replaced md4/md5/sha1 implementations to PolarSSL ones"

This reverts commit aa2656cb9e8f6cdd7921fc36d5e00060065058a4.

Licence issue, we cannot include GPLed source code.


# a820f32e 20-May-2012 Sylvain Rochet <gradator@gradator.net>

Revert "Added PolarSSL DES library, which is necessary for MSCHAP."

This reverts commit de70b710af43942130690e9225b32b02cea279aa.

Licence issue, we cannot include GPLed source code.


# de70b710 20-May-2012 Sylvain Rochet <gradator@gradator.net>

Added PolarSSL DES library, which is necessary for MSCHAP.

Added a README about our PolarSSL included files, clarifying what we did.

Removed crypt(), -lcrypt ( setkey() / encrypt() ) dependencies.


# aa2656cb 19-May-2012 Sylvain Rochet <gradator@gradator.net>

Replaced md4/md5/sha1 implementations to PolarSSL ones

Using cleaned PolarSSL md4/md5/sha1 implementations, without changing the API,
so that lwIP users already doing SSL or using PolarSSL don't need to compile
md4/md5/sha1 twice.

Added to that, we need a DES library for MSCHAP, and PolarSSL provided
a DES support.

And finally, PolarSSL is outstanding :-)


# adf2b2bf 19-May-2012 Sylvain Rochet <gradator@gradator.net>

don't compile wkmodulus[] if SRP is not used


# eb75ae05 15-May-2012 Sylvain Rochet <gradator@gradator.net>

Early development stage of an attempt to port PPPd 2.4.5 to lwIP.

PPPoE works, PPPoS code is not ported at all.

I am using the RP-PPPoE server to do my tests using the following
configuration:

$ cat /etc/ppp/pppoe-server-options
debug
login
lcp-echo-interval 10
lcp-echo-failure 10
ms-dns 192.168.4.130
ms-dns 192.168.4.231
netmask 255.255.255.0
defaultroute
noipdefault
usepeerdns

$ cat /etc/ppp/allip
192.168.4.1-200

$ pppoe-server -C isp -L 192.168.4.254 -p /etc/ppp/allip -I tap0

Plus the usual auth-lines in /etc/ppp/pap-secrets and
/etc/ppp/chap-secrets .

And the unix port minimal "echo" project slightly modified to use
the "tcpip" API, so with threads, which I am going to commit with
NO_SYS as a -Dmacro.

It still use some of the linux'ism, such as syslog() and crypt(),

I do not want to drop the syslog() supports at the moment, this is
pretty useful to debug, and we may just convert the way the syslog() is
done to provide a trace feature to our PPP users, as a compile-time
option.