OpenBSD DES require more than 70 kB of static memory.
The GNU libcrypt DES, for information, require more than 131 kB,
so this is probably the case with all non memory optimised DES.
PolarSSL only required 132 bytes of stack with some kB of .rodata
precomputed tables :-)
I personally don't need MS CHAP v1 or MS CHAP v2, and that was not
supported in the previous PPP port, so there is no regression,
I feel comfortable about removing those hard to port stuff.
If someone want to do the MS CHAP port, he first have to find or
do a small memory footprint DES implementation.
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 :-)
About multilink support.
Multilink uses Samba TDB (Trivial Database Library), which
we cannot port, for the above reason.
We have to choose between doing a memory-shared TDB-clone,
or dropping multilink support at all.
http://ppp.samba.org/cgi-bin/ppp-bugs/incoming?id=2211
Using rp-pppoe pppd exits with exitcode 0, whenever there is no modem connected
and pppd get's a timeout while waiting for a PADO.
This happens because status is set to EXIT_OK in main.c at the beginning of the
procedures. Within start_link(), connect() will be called as one of the first
calls.
If that call fails (no pppoe discovery for example), jumps to "fail", which
returns without setting the status variable to failure. So at the end pppd exits
with EXIT_OK.
I moved the status = EXIT_NEGOTIATION_FAILED which will be set later within
start_link, at the top of it. That seems to work out, patch is attached:
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.