Commit Graph

2506 Commits

Author SHA1 Message Date
Sylvain Rochet
7a57d28db4 moved listen_time global variable to ppp_settings 2012-06-09 16:18:01 +02:00
Sylvain Rochet
ce5121e659 removed unused "unsuccess" global variable 2012-06-09 16:00:22 +02:00
Sylvain Rochet
a7d7158b05 removed useless error_count global variable from ppp.c 2012-06-09 15:58:51 +02:00
Sylvain Rochet
6b8c78bacc moved remote_name and explicit_remote global variable to ppp_settings 2012-06-09 15:55:01 +02:00
Sylvain Rochet
2da930ba4c removed some useless extern 2012-06-09 15:45:52 +02:00
Sylvain Rochet
772cac7946 removed useless error_count global variable 2012-06-09 15:42:57 +02:00
Sylvain Rochet
42f672d85d phase global variable moved to ppp_control structure 2012-06-09 15:39:16 +02:00
Sylvain Rochet
945f2912a7 using PPP_DEBUG instead of debug global variable 2012-06-09 15:09:00 +02:00
Sylvain Rochet
1ccf516c5e options.c is now empty, removed 2012-06-09 14:43:56 +02:00
Sylvain Rochet
fb396b8fac moved debug option from options.c to ppp.c 2012-06-09 14:42:31 +02:00
Sylvain Rochet
6db3026d47 using our_name from ppp_settings (only used in server mode and disabled by default) 2012-06-09 14:39:44 +02:00
Sylvain Rochet
becc306300 using idle_time_limit from ppp_settings 2012-06-09 14:35:06 +02:00
Sylvain Rochet
4e7ce11684 removed holdoff support, can be handled without persist mode outside lwIP 2012-06-09 14:31:45 +02:00
Sylvain Rochet
6589cf9d8e removed useless options 2012-06-09 14:16:59 +02:00
Sylvain Rochet
552589f098 removed multilink option when multilink support is not compiled 2012-06-09 14:14:06 +02:00
Sylvain Rochet
2ec79c03a0 unused ifunit global variable removed 2012-06-09 01:26:21 +02:00
Sylvain Rochet
21653f0f91 pr_log is unused, don't even try to build it 2012-06-09 01:20:01 +02:00
Sylvain Rochet
b922eaa754 print packet is working back, at least for PPPoE 2012-06-09 00:52:20 +02:00
Sylvain Rochet
d27da93c33 now using maxconnect from ppp_settings 2012-06-07 23:34:06 +02:00
Sylvain Rochet
2e6fa7f8a3 dns server support is done, clearing FIXME entries 2012-06-07 23:05:19 +02:00
Sylvain Rochet
302184938a removed malloc() from ms chap 2012-06-07 23:02:08 +02:00
Sylvain Rochet
e5355cc45f PPP server support is now optional (disabled by default, not working until PPP have a "listen" support) 2012-06-07 22:22:57 +02:00
Sylvain Rochet
2fe778507a fixed randm if random MD5 support is not enabled 2012-06-07 22:19:25 +02:00
Sylvain Rochet
4077422ae2 fixed pbuf leaks in ppp_input() in case of packets not expected 2012-06-07 20:41:21 +02:00
Sylvain Rochet
a9ac45c5f0 added PPPoE persist support (don't timeout sending PADI packets) 2012-06-07 01:48:12 +02:00
Sylvain Rochet
7ef99ee6f3 added a persist option (enabled by default for now until we add a way for users to pass a ppp_settings structure)
improved PPPoE state machine and added persist mode support
2012-06-07 00:46:19 +02:00
Sylvain Rochet
e44aada634 improved PPPoE callback with state values, so that PPP know exactly what is happening on the PPPoE side 2012-06-06 23:42:20 +02:00
Sylvain Rochet
ac0a864e14 fixed typos s/parms/params/g 2012-06-06 22:36:23 +02:00
Sylvain Rochet
3c3331d5ed fixed some debug strings 2012-06-06 22:34:16 +02:00
Sylvain Rochet
6f21f48937 added MTU support (using MRU from the peer) 2012-06-05 23:10:38 +02:00
Sylvain Rochet
2e227f868b PPPoE is now guessing its MTU from the underlying netif MTU (in most cases 1500 minus 8 = 1492, which is the most common PPPoE MTU) 2012-06-05 22:22:35 +02:00
Sylvain Rochet
7d7513c71c re-enabled DNS support 2012-06-04 23:19:23 +02:00
Sylvain Rochet
d95f1e9913 added missing initialisation in ppp_init.c 2012-06-04 22:48:12 +02:00
Sylvain Rochet
1013b49ab7 disabled ppp_over_ethernet_close(), which is not exported and probably bogus, until we fix it 2012-06-04 22:23:10 +02:00
Sylvain Rochet
dc0e15a74e we should reduce nak_buffer[] size 2012-06-04 22:22:37 +02:00
Sylvain Rochet
d6e5ca722f setting default route by default 2012-06-04 19:00:36 +02:00
Sylvain Rochet
cd3ba00479 get_mask now returns "255.255.255.255" by default, which is what we want in almost all cases on a PPP link 2012-06-04 18:58:05 +02:00
Sylvain Rochet
c549dba725 re-enabled LCP echo interval / echo fail 2012-06-04 16:25:16 +02:00
Sylvain Rochet
ca1ad99bea PPPoE reauth bug fixed 2012-06-04 15:31:29 +02:00
Sylvain Rochet
2c7bd7e591 fixed print_string() prototype 2012-06-04 01:45:33 +02:00
Sylvain Rochet
bea45b3c30 cleared IDE warnings 2012-06-04 00:59:24 +02:00
Sylvain Rochet
093c7b4386 cleaned depreacted __P() and __V() macros, removed the legacy varargs.h header 2012-06-04 00:34:28 +02:00
Sylvain Rochet
8332a5aa53 disabled all plugins hooks 2012-06-04 00:12:45 +02:00
Sylvain Rochet
eb020656d2 disabled all plugins hooks 2012-06-04 00:12:17 +02:00
Sylvain Rochet
31456a6dfe removed CamelCase in ppp.c and ppp_impl.h, added compat macro in ppp.h (but disabled for now) 2012-06-03 23:56:56 +02:00
Sylvain Rochet
03fda0f803 removed CamelCase for all ppp.h declared functions 2012-06-03 21:48:10 +02:00
Sylvain Rochet
c09f03f6e8 VJ support is back! 2012-06-03 20:44:47 +02:00
Sylvain Rochet
3bad9ff50a ppp_impl.h is back! 2012-06-03 20:25:32 +02:00
Sylvain Rochet
0663421d01 re-added PPPoS code from the previous port, it builds, maybe it works 2012-06-03 20:05:40 +02:00
Sylvain Rochet
10175caa38 fixed MD5 Random enabling conditions 2012-06-03 16:59:50 +02:00
Sylvain Rochet
103ad75c50 automatically enable MD5 Random support if CHAP or EAP is enabled 2012-06-03 16:51:03 +02:00
Sylvain Rochet
2f5f86d6fc don't build any PPP file if PPP support is disabled 2012-06-03 16:38:26 +02:00
Sylvain Rochet
89d2c2917f more ppp.[ch] cleaning 2012-06-03 16:24:33 +02:00
Sylvain Rochet
05817aa3b9 LQR (Link Quality Report) support is now optional 2012-06-03 14:02:25 +02:00
Sylvain Rochet
5464ed6661 removed all useless header files, merged ppp_defs.h to ppp.h
removed session.[ch] and tty.c which are Unix-centric files and disabled
2012-06-03 13:53:45 +02:00
Sylvain Rochet
05c84a147d added ECP_SUPPORT in opt.h (disabled by default); renamed MD5_SUPPORT to PPP_MD5_RANDM, which is more meaningful 2012-06-03 13:07:46 +02:00
Sylvain Rochet
9c35403b98 clarified a bit more ppp.[ch] 2012-06-03 01:46:46 +02:00
Sylvain Rochet
b5b075eb04 demystified a bit the PPP impl, renamed output() to ppp_output() to prevent conflict 2012-06-03 00:30:12 +02:00
Sylvain Rochet
e1261c9620 removed all system headers except the strict minimum 2012-06-02 23:29:40 +02:00
Sylvain Rochet
5531bca078 make it build with avr32-gcc
Disabled Unix-centric non necessary include files

Changed some include paths

Removed all printf() I put there and there for debugging.

It builds with the avr32 gcc toolchain, meaning we removed
all the pppd code requiring a unix base.
2012-06-02 23:04:03 +02:00
Sylvain Rochet
28b9dd50ff build PolarSSL MD5 if MD5_SUPPORT is enabled (for randm) 2012-06-02 21:31:13 +02:00
Sylvain Rochet
44c2a0a7fc fixed most PPP compilation warnings with -pedantic 2012-06-02 21:25:58 +02:00
Sylvain Rochet
d143acfc76 fixed all PPP compilation warnings with -Wall 2012-06-02 20:46:52 +02:00
Sylvain Rochet
b4d59fd52d removed headers that were initially copied but not used (yet) 2012-06-02 19:37:40 +02:00
Sylvain Rochet
2ee2a1b730 removed sys-linux.c 2012-06-02 19:34:37 +02:00
Sylvain Rochet
86ebc8e46c removed pppd.h and ppp.c, renamed pppmy.c to ppp.c and pppmy.h to ppp.h 2012-06-02 19:30:31 +02:00
Sylvain Rochet
29c5ee6b19 pppd.h disabled, renamed MAX() to LWIP_MAX() 2012-06-02 19:19:51 +02:00
Sylvain Rochet
323aebf1f5 cleaning unused stuff in pppd.h, syslog() is no more used 2012-06-02 18:47:53 +02:00
Sylvain Rochet
a5dd1ccfaa ppp.c disabled, everything required for lwIP moved to our impl 2012-06-02 18:07:34 +02:00
Sylvain Rochet
4dd297cef2 protent table moved to our PPP impl 2012-06-02 17:22:12 +02:00
Sylvain Rochet
7f9fea18ae added pppmy.h in all .c files to easily find conflicts 2012-06-02 17:12:55 +02:00
Sylvain Rochet
adb8b881b4 resolve conflit, ipcp.c defines ip_ntoa() which is already defined by lwIP, disabled ipcp.c::ip_ntoa() and using lwIP one 2012-06-02 17:04:46 +02:00
Sylvain Rochet
d3d1b69c7a more ppp.c cleaning 2012-06-02 16:56:20 +02:00
Sylvain Rochet
922d3716ff PPP statistics optional (non working) compile time option added 2012-06-02 16:41:09 +02:00
Sylvain Rochet
4158222e86 moved new_phase() to our own implementation, re-enabled new_phase() support 2012-06-02 15:00:18 +02:00
Sylvain Rochet
6727c43441 PPP notifier support is now a compile time option
However, as of now, the notify() function is empty, so it requires
some work if someone want to use it.

The notify feature allows someone to be able to follow the
state of the PPP stack (auth ok, ipcp up, initialise, ...), this
is like the callback feature set by pppOverEthernetOpen() and others,
but with more details.
2012-06-02 14:48:04 +02:00
Sylvain Rochet
55c1ec2925 re-enabled auth notifiers 2012-06-02 14:12:54 +02:00
Sylvain Rochet
0f1c18e675 PPP interval timeout support disabled (using lwIP timeout support), protocol_name() moved to our PPP impl and disabled by default 2012-06-02 13:46:45 +02:00
Sylvain Rochet
0de1293ff5 clarifying what is actually the "datainput" entry in protent 2012-06-02 13:03:43 +02:00
Sylvain Rochet
89ab390719 added necessary pppSingleBuf() call before passing the packet to the appropriate PPP subsystem 2012-06-02 02:44:18 +02:00
Sylvain Rochet
88ef3ffa50 POSIX signal support removed 2012-06-02 02:30:43 +02:00
Sylvain Rochet
668d5d9d92 removed set/getenv functions 2012-06-02 02:23:56 +02:00
Sylvain Rochet
6c908ac727 removed more protent fields only used by print packets functions 2012-06-02 02:14:19 +02:00
Sylvain Rochet
2c4bd7162f print packet functions are now optional 2012-06-02 02:07:49 +02:00
Sylvain Rochet
cf18e0776d removed demand prototypes if not compiled-in 2012-06-02 01:55:24 +02:00
Sylvain Rochet
8b866beaeb 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.
2012-06-02 00:53:25 +02:00
Sylvain Rochet
ee5fca7a2b removed pathnames.h and pidfile support 2012-06-02 00:33:37 +02:00
Sylvain Rochet
fc074937f5 Linux ioctl() gone, ECP support optional, CCP support optional
Removed all the used Linux ioctl(), sys_linux.c is entirely disabled.

Replaced unecessary functions to set up a PPP link to null fonctions,
however all stuff necessary to shutdown a PPP link should be done.

Some utils functions related to I/O files are disabled too.

ECP and CCP support only set PPP attributes into the PPP kernel support,
they are now compile-time options and are disabled by default and
obviously not supported (yet? :p)
2012-06-02 00:19:40 +02:00
Sylvain Rochet
a17ea13453 autoselecting which PolarSSL files to use support added 2012-06-01 01:10:02 +02:00
Sylvain Rochet
8bb4ea85b8 removed some useless Linux calls 2012-06-01 01:07:27 +02:00
Sylvain Rochet
26e8372c75 changed PolarSSL compile-time condition 2012-06-01 00:59:15 +02:00
Sylvain Rochet
4704efa32a PAP support is now an optional compile-time feature 2012-05-30 23:32:30 +02:00
Sylvain Rochet
339925e835 CHAP support is now an optional compile-time feature 2012-05-24 00:52:20 +02:00
Sylvain Rochet
28360a7f26 MSCHAP is now an optional compile-time feature 2012-05-23 23:29:19 +02:00
Sylvain Rochet
49bb62d221 and less and less useless auth code (will this end ?) 2012-05-23 00:51:59 +02:00
Sylvain Rochet
04f121b88f less and less auth code 2012-05-23 00:04:07 +02:00
Sylvain Rochet
6ce5c8eb78 disabled upap_rauthreq() 2012-05-22 23:07:28 +02:00
Sylvain Rochet
7736cdae1c replaced BCOPY to lwip-MEMCPY 2012-05-22 23:02:02 +02:00
Sylvain Rochet
05aa1f1ae4 using MEMCPY() instead of memcpy() 2012-05-22 22:13:41 +02:00
Sylvain Rochet
42827cdea2 more and more ppp options removal 2012-05-22 21:59:23 +02:00
Sylvain Rochet
b88dad4034 disabled almost all PPP options strings and support as well as useless file-based auth code 2012-05-22 01:28:30 +02:00
Sylvain Rochet
d0645273df removed HMAC support from ciphers 2012-05-21 23:02:27 +02:00
Sylvain Rochet
dea27e105d cleaned PolarSSL files 2012-05-21 22:48:41 +02:00
Sylvain Rochet
0bfad4392a Commit to prouve we copied the raw BSD PolarSSL files 2012-05-21 22:33:37 +02:00
Sylvain Rochet
4c1b507c07 fixed MS-CHAP and MS-CHAP-V2, MD4 polarssl uses bytes as input length, not bits 2012-05-21 22:26:20 +02:00
Sylvain Rochet
0289055948 Revert "Revert "Added PolarSSL DES library, which is necessary for MSCHAP.""
This reverts commit a820f32ec9.
2012-05-21 22:15:40 +02:00
Sylvain Rochet
83a48dafea Revert "Revert "Replaced md4/md5/sha1 implementations to PolarSSL ones""
This reverts commit ca2fd867b8.
2012-05-21 22:14:29 +02:00
Sylvain Rochet
a7a20a9de4 Revert "now using OpenBSD DES implementation"
This reverts commit a9672e1a21.
2012-05-21 22:14:13 +02:00
Sylvain Rochet
82b67b01ff Revert "removed salted DES ( known as crypt() function ), we don't need it"
This reverts commit 517659640e.
2012-05-21 22:14:02 +02:00
Sylvain Rochet
b896203dcf Revert "Removed all stuff requiring encryption."
This reverts commit c268c5e07c.

Conflicts:

	src/netif/ppp/auth.c
	src/netif/ppp/ppp.c
	src/netif/ppp/pppmy.c
	src/netif/ppp/pppmy.h
2012-05-21 22:04:04 +02:00
Sylvain Rochet
795d5807b5 EAP support is now optional 2012-05-21 01:18:36 +02:00
Sylvain Rochet
7d43f4a1f4 removed useless system header from EAP 2012-05-21 00:03:18 +02:00
Sylvain Rochet
c268c5e07c Removed all stuff requiring encryption.
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.
2012-05-20 23:23:14 +02:00
Sylvain Rochet
517659640e removed salted DES ( known as crypt() function ), we don't need it 2012-05-20 22:47:12 +02:00
Sylvain Rochet
a9672e1a21 now using OpenBSD DES implementation 2012-05-20 22:32:24 +02:00
Sylvain Rochet
4570f71f21 modified auth_reset() so that we can choose which auth we want 2012-05-20 20:46:45 +02:00
Sylvain Rochet
ca2fd867b8 Revert "Replaced md4/md5/sha1 implementations to PolarSSL ones"
This reverts commit aa2656cb9e.

Licence issue, we cannot include GPLed source code.
2012-05-20 20:40:27 +02:00
Sylvain Rochet
624da03bad Revert "modified auth_reset() so that we can choose which auth we want"
This reverts commit bf10a27db8.

Licence issue, we cannot include GPLed source code.
2012-05-20 20:40:08 +02:00
Sylvain Rochet
a820f32ec9 Revert "Added PolarSSL DES library, which is necessary for MSCHAP."
This reverts commit de70b710af.

Licence issue, we cannot include GPLed source code.
2012-05-20 20:39:15 +02:00
Sylvain Rochet
f5dc6e80c0 Removed uneeded crypt() from auth.c and session.c 2012-05-20 20:04:05 +02:00
Sylvain Rochet
de70b710af 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.
2012-05-20 19:57:37 +02:00
Sylvain Rochet
bf10a27db8 modified auth_reset() so that we can choose which auth we want
also fixed MS-CHAP and MS-CHAP-V2, MD4 polarssl uses bytes as input
length, not bits
2012-05-20 15:27:52 +02:00
Sylvain Rochet
aa2656cb9e 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 :-)
2012-05-20 01:44:22 +02:00
Sylvain Rochet
adf2b2bf03 don't compile wkmodulus[] if SRP is not used 2012-05-19 22:59:08 +02:00
Sylvain Rochet
6773326d96 replaced MIN to LWIP_MIN 2012-05-17 23:41:39 +02:00
Sylvain Rochet
1d7efce0dc Removed TDB code, which we cannot port, because it needs a filesystem.
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.
2012-05-17 23:21:09 +02:00
Sylvain Rochet
1a1deb5d58 reworked magic/randm 2012-05-17 22:42:07 +02:00
Sylvain Rochet
bcba806ef0 ported randm module from previous PPP port 2012-05-17 21:45:02 +02:00
Sylvain Rochet
00648c27eb world changed, removed IPX support 2012-05-17 20:22:17 +02:00
Sylvain Rochet
4885b39121 removed run_program() support 2012-05-17 20:17:31 +02:00
Sylvain Rochet
0f3e70b679 removed user and passwd globals 2012-05-17 20:05:37 +02:00
Sylvain Rochet
372a0f9eea moved refuse_mschap, refuse_mschap_v2, refuse_eap from globals to ppp_settings 2012-05-17 19:41:34 +02:00
Sylvain Rochet
2a44bad2e7 removed passwd_from_file usage, removed some of unused PAP file fetch code 2012-05-17 19:29:54 +02:00
Sylvain Rochet
33e8472473 CHAP auth is now working 2012-05-17 19:05:47 +02:00
Sylvain Rochet
8834a8b216 using UNTIMEOUT macro instead of timeout() 2012-05-17 16:36:59 +02:00
Sylvain Rochet
db794c2d32 PPPoL2TP patch from Debian, not used yet, but already fixed 2012-05-17 16:29:00 +02:00
Sylvain Rochet
a1d80c29de fixed demand_rexmit() with new IP addr, maybe we will never support demand or drop it, but it is already patched just in case 2012-05-17 16:23:32 +02:00
Sylvain Rochet
bea796ebc0 pppd: Terminate correctly if lcp_lowerup delayed calling fsm_lowerup 2012-05-17 16:14:30 +02:00
Sylvain Rochet
d4978210f0 using rp-pppoe pppd exits with EXIT_OK after receiving a timeout waiting for PADO due to no modem attached, from Debian patches
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:
2012-05-17 15:56:35 +02:00
Sylvain Rochet
ef59e952d8 added IPCP no/replace default route option from Debian patches, I like the idea 2012-05-17 15:55:27 +02:00
Sylvain Rochet
54d5ee5562 added LCP adaptive echo from Debian patches, I like the idea 2012-05-17 15:50:15 +02:00
Sylvain Rochet
eb75ae05c6 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.
2012-05-16 02:02:02 +02:00
goldsimon
b56a1501d2 fixed bug #36412: memp.c does not compile when MEMP_OVERFLOW_CHECK > zero and MEMP_SEPARATE_POOLS == 1 2012-05-11 22:56:53 +02:00
goldsimon
fe9c716fbe Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip 2012-05-11 22:37:30 +02:00
goldsimon
bc308c21fc fixed bug: #36380 unsent_oversize mismatch in 1.4.1RC1 (this was a debug-check issue only) 2012-05-08 07:42:32 +02:00
goldsimon
3e41f36ef5 Added a readme.txt about the PPP code. 2012-05-07 22:12:01 +02:00
Ivan Delamer
289566afe8 In ip6_input(), do not accept link-local packets on netifs other than
inp.

Change-Id: I7f3c779e69292bc078890e0acdc37112559644ce
2012-05-04 18:25:22 -06:00
Ivan Delamer
944adc56ee Fixed #define that was commited by mistake.
Change-Id: Ic44560284e932b2d7c503155085160647ac82bb8
2012-05-04 18:19:40 -06:00
Ivan Delamer
6e81f722ad In ip6_input(), accept solicited node packets that match the receiving
netif addresses, when multicast is disabled.

Change-Id: I3f59258ee605a820f0a525b696b1dede0d53948f
2012-05-04 18:11:47 -06:00
Ivan Delamer
bfa28f4c30 fixes bug #36389: Use IPv6 Src Address of Echo Response as Destination
Address in Echo Response
2012-05-04 17:43:54 -06:00
Ivan Delamer
3dcd33b08f Fix bug #36391 - inet6_addr_to_ip6addr()
Change-Id: I2ab73901a8552e3c247d95985f6ce5d6ef7d4599
2012-05-04 17:33:06 -06:00
goldsimon
3ac81e9d7c patch by Sylvain Rochet: fixed bug #36283 (PPP struct used on header size computation and not packed) 2012-05-03 20:39:43 +02:00
goldsimon
1704d21356 dhcp: check array bounds before accessing it (bug #36170) 2012-05-03 20:21:50 +02:00
goldsimon
fb07a28c99 fixed bug #36388 (PPP: checksum-only in last pbuf leads to pbuf with zero length) 2012-05-03 19:45:22 +02:00
goldsimon
1dff9aea62 fixed the fix for bug #35945 (SYN packet should provide the recv MSS not the send MSS) if TCP_CALCULATE_EFF_SEND_MSS==0 2012-03-28 11:06:52 +02:00
goldsimon
e5d54f5344 fixed bug #35756 header length calculation problem in ppp/vj.c - removed unused/invalid defines TCPH_OFFSET(_SET). 2012-03-27 20:42:46 +02:00
goldsimon
a558c01589 fixed bug #35945: SYN packet should provide the recv MSS not the send MSS 2012-03-27 20:18:23 +02:00
goldsimon
7043983acc udp_input: fixed unreachable code warning for CHECKSUM_CHECK_UDP==0 2012-03-25 17:20:22 +02:00
goldsimon
dd245c63d7 tcp_abort/tcp_abandon: don't send RST if pcb->state is CLOSED 2012-03-25 17:19:46 +02:00
goldsimon
c622985fda Better fix for bug #35927 (missing refragmentaion in ip_forward) when IP_FRAG is disabled. 2012-03-25 15:12:42 +02:00
goldsimon
d910786034 added posix-compatibility include files posix/netdb.h and posix/sys/socket.h which are a simple wrapper to the correct lwIP include files. 2012-03-25 15:02:58 +02:00
goldsimon
8dbf572ea5 Fixed bug #35817: do_connect() invalidly signals op_completed for UDP/RAW with LWIP_TCPIP_CORE_LOCKING==1 2012-03-25 14:56:41 +02:00
goldsimon
f8af1a7443 fixed bug #35931: Name space pollution in api_msg.c and netifapi.c 2012-03-25 14:41:27 +02:00
goldsimon
d95bcab053 fixed bug #35927: missing refragmentaion in ip_forward 2012-03-22 19:35:04 +01:00
Ivan Delamer
2b4c10e705 Support single-packet queueing in ND6 (similar to ARP), when
!LWIP_ND6_QUEUEING.
2012-03-22 11:14:49 -06:00
Ivan Delamer
ac4c802089 Disable leftover ND6 queueing code when !LWIP_ND6_QUEUING. 2012-03-22 10:25:50 -06:00
goldsimon
c6e4b8f829 patch by Mason: fixed bug #35907: lwip_gethostbyname_r returns an invalid h_addr_list 2012-03-20 22:06:32 +01:00
goldsimon
52d41d19d3 Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip 2012-03-12 16:43:23 +01:00
goldsimon
0e7df4b193 Removed unnecessary global variable "subnetMask", which is only used in one function (GetMask) 2012-03-12 16:42:18 +01:00
goldsimon
2c9b3b35d1 patch by Bostjan Meglic: fixed bug #35809: PPP GetMask(): Compiler warning on big endian, possible bug on little endian system 2012-03-12 16:39:52 +01:00
Ivan Delamer
773dcae2f9 Missing declarations in supporting IP_HDRINCL. 2012-03-02 09:35:42 -07:00
Ivan Delamer
22e7b674ed Check arguments in nd6, and some other minor fixes nearby. 2012-03-02 09:27:14 -07:00
Ivan Delamer
8c95422204 Early exit when checking if ip6 reassembled packet is valid. 2012-03-02 09:18:54 -07:00
Ivan Delamer
34531a8160 Check that pbuf_header succeeds in IPv6 reassembly. 2012-03-02 09:16:33 -07:00
Ivan Delamer
5c199483cd Support IP_HDRINCL in ip6_output() and ip6_output_hinted(),
previously only supported in ip6_output_if().
2012-03-02 09:06:57 -07:00
Ivan Delamer
c52189557e Fixed error in calculating some IPv6 option header lengths. 2012-03-02 08:59:34 -07:00
Ivan Delamer
bcabe63971 Set ip_data.current_netif earlier to allow ICMPv6 packets in ip6_fwd.
Then set to "accepted" netif, not inp.
2012-03-02 08:53:51 -07:00
goldsimon
193ccaa3b4 IGMP stats: added missing tab (by Gisle Vanem) 2012-03-01 19:21:17 +01:00
goldsimon
c6605766e7 Fixed unused variable warnings produced with the last commit 2012-03-01 19:10:52 +01:00
goldsimon
4fca628d36 Speed up LWIP_TCPIP_CORE_LOCKING by directly calling functions in api_msg.c instead of calling via function pointer. 2012-02-28 12:45:59 +01:00
goldsimon
7f81c62bf0 fixed bug #35595: Impossible to send broadcast without a gateway (introduced when fixing bug# 33551) 2012-02-23 10:14:27 +01:00
goldsimon
ac2175fa7d fixed pbuf leak when PPP session is aborted through pppSigHUP() (bug #35541: PPP Memory Leak) 2012-02-16 12:55:14 +01:00
goldsimon
5816bab6a2 fixed bug #35531: Impossible to send multicast without a gateway (introduced when fixing bug# 33551) 2012-02-16 12:30:52 +01:00
goldsimon
d0d650aa67 Patch by Stéphane Lesage:
fixed bug #35536 SNMP: error too big response is malformed
2012-02-16 08:01:54 +01:00
goldsimon
6d5ec9c998 fixed bug #35537: MEMP_NUM_* sanity checks should be disabled with MEMP_MEM_MALLOC==1 2012-02-16 07:33:38 +01:00
goldsimon
fe08467e45 Removed unused variable in ip_debug_print() 2012-02-14 21:29:14 +01:00
goldsimon
26e03b81fe Fixed unused variable warning 2012-02-14 19:41:46 +01:00
goldsimon
f6582fd229 Correctly calculate the default value of MEMP_NUM_SYS_TIMEOUT as needed 2012-02-13 21:38:48 +01:00
goldsimon
5e87126c38 Multiple compilation fixes:
- use C style comments, not C++ style;
- don't use #if with undefined parameter;
2012-02-13 21:38:28 +01:00
goldsimon
c279692cfe Fixed unused local variable warning (patch #7711) 2012-02-13 20:41:58 +01:00
goldsimon
7d0dab9d7d partly fixed bug #25882: TCP hangs on MSS > pcb->snd_wnd (by not creating segments bigger than half the window) 2012-02-12 14:14:19 +01:00
goldsimon
16555ad12e tcp pcb: persist_cnt can be u8_t instead of u32_t (since it is compared against u8_t only) 2012-02-12 14:04:59 +01:00
goldsimon
9a95c2ff08 fixed bug #35435: No pcb state check before adding it to time-wait queue while closing 2012-02-11 18:15:17 +01:00
Ivan Delamer
1d6347c9b0 Allow unicast NA messages without LLA option, in accordance to RFC2461
section 4.4, and as suggested by Phillip Toelke.

Change-Id: Ic9d9a6ad82ec201d25b9fc024936cfb1b41f1a7a
2012-01-27 14:54:39 -07:00
goldsimon
13075460ea fixed bug #35305: pcb may be freed too early on shutdown(WR) 2012-01-22 11:18:36 +01:00
goldsimon
4c3dfb92b7 fixed bug #34636: FIN_WAIT_2 - Incorrect shutdown of TCP pcb: don't let PCBs time out from FIN_WAIT_2 if the RX side wasn't close (by either calling tcp_close or tcp_shutdown(RDWR)) 2012-01-21 18:05:15 +01:00
goldsimon
fc2efaeb8c Fixed my last chagne to pbuf_copy 2012-01-21 16:57:53 +01:00
goldsimon
b15e60243b - fixed bug #35151: DHCP asserts on incoming option lengths;
- fixed wrong CHANGELOG of the last commit
2012-01-20 21:36:52 +01:00
goldsimon
f2de3215c3 pbuf_copy(): moved the check for "p_to != NULL" to a better place. 2012-01-20 21:21:10 +01:00
goldsimon
efbad07643 fixed bug #35291: NULL pointer in pbuf_copy 2012-01-20 21:19:26 +01:00
goldsimon
69d61eda01 Added option CHECKSUM_GEN_ICMP 2012-01-16 09:40:15 +01:00
goldsimon
e9255d3714 Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip 2012-01-12 15:40:41 +01:00
goldsimon
c8647c0396 implemented API functions to access so_options of IP pcbs (UDP, TCP, RAW) (fixes bug #35061) 2011-12-17 22:12:01 +01:00
goldsimon
8114627d6a Fixed typo in define check: LWIP_IPv6_FRAG -> LWIP_IPV6_FRAG 2011-12-14 21:42:51 +01:00
goldsimon
5048a30fc7 Another fix for bug #32417 (debug assert that fires) 2011-12-06 21:21:44 +01:00
Ivan Delamer
ce6fb83ef4 bug #34846: time-exceeded was sometimes not sent to original fragment
source, but to the sender of a packet fragment that triggered a buffer
purge.

Change-Id: I4bf20747bd900150491852649918a85cb7bf2aad
2011-11-29 12:49:43 -07:00
Ivan Delamer
85f8a59d7f Added parenthesis to netif/ip6 macros.
Change-Id: I32d7f28c9e106641e3d5be8342d2c884e166bb0e
2011-11-28 14:07:53 -07:00
goldsimon
dd8729063c fixed bug #31177: tcp timers can corrupt tcp_active_pcbs in some cases 2011-11-25 18:36:52 +01:00
goldsimon
14c766e750 fix for bug #34684 was wrong (netif for arp table entries was only set/reset with SNMP enabled) 2011-11-24 21:11:11 +01:00
goldsimon
3a11a8a01d Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip 2011-11-24 07:47:40 +01:00
goldsimon
988815579a fixed bug #34884: sys_msleep() body needs to be surrounded with '#ifndef sys_msleep' 2011-11-23 20:58:19 +01:00
goldsimon
d1fa13ed52 fix compilation of ip_canforward on 8-/16-bit platforms (where constants are 16-bit and thus cannot be left-shifted by 24) 2011-11-23 09:09:22 +01:00
goldsimon
08b497faea fixed bug #34684: Clear the arp table cache when netif is brought down 2011-11-22 21:44:28 +01:00
goldsimon
96d332e234 Fix icmp6_send_response: cannot assign (packed) ip6_addr_p_t* to ip6_addr_t* -> need to copy the packed address to an aligned address first 2011-11-22 21:41:20 +01:00
Ivan Delamer
440f31a4d3 Add IPv6 timeouts to check for MEMP_NUM_SYS_TIMEOUT).
Change-Id: Ic6a9493cde41652391b34a47e6003b9036f760de
2011-11-17 14:24:16 -07:00
Ivan Delamer
cb91705e03 Generate ICMPv6 responses from a context other than input callback
(e.g. timers in IPv6 reassembly). see bug #34846.

Change-Id: I6b4d27c819291d8371c43288310d57c3f2c1c65f
2011-11-17 10:55:45 -07:00
goldsimon
d12e742373 Fixed bug #34733 Null pointer exception with SOCKET_DEBUG. 2011-11-13 17:06:19 +01:00
goldsimon
7aa7c0f481 SEQ-comparing defines: cast parameters to u32_t for clarity 2011-10-29 21:43:13 +02:00
Ivan Delamer
b3ffa16315 Use pppRecvWakeup only if PPP_INPROC_OWNTHREAD is defined.
Change-Id: Ie800289eb5f6a64d0be1d38eab7154d4aa473d57
2011-10-28 16:22:54 -06:00
Ivan Delamer
09d1f55bce Conditional compilation in ppp.c according to PPP_ options.
Change-Id: I466ce2b0114c9428f5e21bd0a09bb221f40bfc3e
2011-10-28 14:23:20 -06:00
Ivan Delamer
21333d0f18 handle NULL when parsing IPv6 address (check for formatting)
Change-Id: I42e1288689946c295e0bd1490a5eb4d8befb5877
2011-10-28 13:54:16 -06:00
goldsimon
edcc859b58 fixed bug #34638: Dead code in tcp_receive - pcb->dupacks 2011-10-28 13:09:04 +02:00
Ivan Delamer
2ce17a724a Fix bug #34526: nd6_queue_packet() frees too much if out-of-memory
Change-Id: Ib7ac0cb1b5a5389dd5449a908485493bd085ba9d
2011-10-26 14:31:48 -06:00
goldsimon
0fb07ba328 - moved processing of refused_data to an own function (used from tcp_fasttmr and tcp_input);
- improved readability of tcp_slowtmr by using defines to access keepalive variables
2011-10-23 18:10:46 +02:00
goldsimon
78f0307246 Slipif: fixed IPv6 support 2011-10-23 17:38:23 +02:00
goldsimon
c5203ab5ea fixed bug #34429: possible memory corruption with LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT set to 1 2011-10-23 17:31:03 +02:00
goldsimon
3d1a306518 SLIP netif: add support for multiple input strategies (threaded, polling, RX from ISR) 2011-10-21 22:25:44 +02:00
goldsimon
2750d61e92 added missing valid/set_invalid defines for NO_SYS 2011-10-21 19:47:37 +02:00
goldsimon
43ac5ad70d removed the need to disable ARP_QUEUEING when LWIP_ARP is disabled an TCP_QUEUE_OOSEQ when LWIP_TCP is disabled 2011-10-21 13:24:33 +02:00
goldsimon
309e936ad9 Fix default value of TCP_SNDLOWAT for small values of TCP_SND_BUF (broken with my 2nd-last commit) 2011-10-19 12:55:32 +02:00
Simon Goldschmidt
d00fa906cf fixed bug #34592: lwip_gethostbyname_r uses nonstandard error value, removed those unused (nonstandard?) error values from arch.h 2011-10-18 20:56:08 +02:00
Simon Goldschmidt
01839b9c14 fixed default values of TCP_SNDLOWAT and TCP_SNDQUEUELOWAT for small windows (bug #34176 select after non-blocking send times out) 2011-10-18 20:22:09 +02:00
Simon Goldschmidt
1f396946e5 fixed bug #34587: TCP_BUILD_MSS_OPTION doesn't consider netif->mtu, causes slow network 2011-10-18 20:11:39 +02:00
goldsimon
2f58ef781c fixed bug #34581 missing parentheses in udplite sockets code 2011-10-18 11:04:08 +02:00
goldsimon
8b9f70ac08 fixed bug #34580 fcntl() is missing in LWIP_COMPAT_SOCKETS 2011-10-18 11:00:10 +02:00
Simon Goldschmidt
e039d4103f fixed bug #34569: shutdown(SHUT_WR) crashes netconn/socket api 2011-10-17 19:38:47 +02:00
Simon Goldschmidt
0333e81616 fixed bug #34517 (persist timer is started although no zero window is received) by starting the persist timer when a zero window is received, not when we have more data queued for sending than fits into the window 2011-10-13 21:18:16 +02:00
Simon Goldschmidt
cf1be4ae2d fixed bug #34541: LWIP_U32_DIFF is unnecessarily complex: removed that define 2011-10-13 19:29:48 +02:00
Simon Goldschmidt
dc34636598 fixed bug #34540: compiler error when CORE_LOCKING is used and not all protocols are enabled 2011-10-13 19:25:11 +02:00
Simon Goldschmidt
c74d881d3d fixed bug #34534: Error in sending fragmented IP if MEM_ALIGNMENT > 4 2011-10-12 18:17:07 +02:00
Simon Goldschmidt
b4c4fae3f5 slightly rearranged freeing an acked segment to prevent keeping the reference too long 2011-10-11 21:41:58 +02:00
Simon Goldschmidt
f29bdd21a7 fixed bug #34426: tcp_zero_window_probe() transmits incorrect byte value when pcb->unacked != NULL 2011-10-09 20:11:33 +02:00
Simon Goldschmidt
9d31401d47 fixed bug #34447 LWIP_IP_ACCEPT_UDP_PORT(dst_port) wrong 2011-10-09 14:30:49 +02:00
Simon Goldschmidt
5c68bbe16f Tried to fix bug #32417 ("TCP_OVERSIZE seems to have problems with (fast-)retransmission"): Reset pcb->unsent_oversize in 2 more places... 2011-09-29 21:12:34 +02:00
Simon Goldschmidt
07c610e068 Implemented limiting data on ooseq queue (task #9989) (define TCP_OOSEQ_MAX_BYTES / TCP_OOSEQ_MAX_PBUFS in lwipopts.h), added unit test for this new feature 2011-09-27 22:42:46 +02:00
Simon Goldschmidt
998f109fc8 fixed bug #28288: Data after FIN in oos queue 2011-09-27 21:08:49 +02:00
goldsimon
cfb70bccc1 bug #34406 dhcp_option_hostname() can overflow the pbuf 2011-09-27 07:49:04 +02:00
Simon Goldschmidt
6c56151d27 fixed bug #34377 MEM_SIZE_F is not defined if MEM_LIBC_MALLOC==1 2011-09-24 13:59:33 +02:00
Simon Goldschmidt
98274d2145 Reverted invalid fix for invalid bug #34360 done yesterday... 2011-09-23 19:26:29 +02:00
Simon Goldschmidt
1d125f55ba Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/lwip 2011-09-23 19:16:01 +02:00