Sylvain Rochet
fbbde125d9
PPP, removed unnecessary ethif from ppp_pcb
2012-09-01 15:05:21 +02:00
Sylvain Rochet
dbaefd6126
PPP, cleaned persist and holdoff features
2012-09-01 14:43:31 +02:00
Sylvain Rochet
a1c87f7c49
PPP, improved fsm_sconfreq() allocated buffer size
2012-08-27 19:10:09 +02:00
Sylvain Rochet
045ee53468
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).
2012-08-27 00:47:21 +02:00
Sylvain Rochet
b84ab718b0
PPP, ppp_input() code cleaning, removed dead code, fixed indentation
2012-08-25 20:38:54 +02:00
Sylvain Rochet
6144deb6b6
PPP, moved out PPPoS code into their own functions, improved ppp.c readability
2012-08-25 20:30:14 +02:00
Sylvain Rochet
19864a4a08
PPP L2TP, only skip HDLC header if necessary
...
RFC 2661 does not specify whether the PPP frame in the L2TP payload should
have a HDLC header or not. We handle both cases for compatibility.
2012-08-25 18:15:15 +02:00
Sylvain Rochet
7920b6e163
PPP, don't allocate twice struct eth_hdr per PPPoE pbuf
2012-08-25 16:21:58 +02:00
Sylvain Rochet
4928166593
Merge branch 'master' into ppp-new
2012-08-23 20:51:53 +02:00
Sylvain Rochet
ad5f520c68
PPP, updated pppapi_reopen() to follow ppp_reopen() prototype change
2012-08-23 20:47:14 +02:00
goldsimon
150b4fb4f6
fixed bug #37166 : memp_sanity check loops itself
2012-08-22 21:59:02 +02:00
Sylvain Rochet
076f177100
Added PPPd follow-up file, so that we can track what is happening on pppd.
...
The lwIP PPP support is based from pppd 2.4.5 (http://ppp.samba.org ) with
huge changes to match code size and memory requirements for embedded devices.
Anyway, pppd has a mature codebase for years and the average commit count
is getting low on their Git repositories, meaning that we can follow what
is happening on their side and merge what is relevant for lwIP.
So, here is the pppd follow up, so that we don't get away too far from pppd.
2012-08-22 17:40:23 +02:00
Sylvain Rochet
3b939480a4
PPP, added missing entry in pppapi.h
2012-08-22 11:41:07 +02:00
Sylvain Rochet
773a2767c7
PPP, added missing pppapi_delete() thread safe function
2012-08-21 20:26:37 +02:00
Sylvain Rochet
e9b29184d0
PPP, renamed all functions using common names in utils.c that can conflict with lwIP user code during link operation
2012-08-21 20:21:38 +02:00
Sylvain Rochet
0d02b8d1f6
added <stdlib.h> to ppp_impl.h, some PPP modules are using strtol()
2012-08-21 20:03:57 +02:00
Sylvain Rochet
98c0fcc659
Added <string.h> header to ppp_impl.h, this appears to be required, found out by Ivan Delamer.
2012-08-18 22:43:23 +02:00
Sylvain Rochet
1ddebcc862
Moved PPP headers into include/netif/ppp/, fixing bug #37040 .
2012-08-18 22:40:19 +02:00
Sylvain Rochet
1adb900561
Moved the include of lwip_md5.h or md5.h into the #if PPP_MD5_RANDM block, as suggested by Ivan Delamer
2012-08-18 12:56:59 +02:00
Sylvain Rochet
c5c1012ddd
removed some compiler warnings in pppoe_disconnect()
2012-08-17 23:42:14 +02:00
Sylvain Rochet
519f81771a
Merge remote-tracking branch 'origin/master' into ppp-new
2012-08-17 23:11:47 +02:00
Ivan Delamer
c762c06b17
Fixed typo in previous commit.
...
Change-Id: I97f85f4593509911829cfbbb6e309eecedd5465b
2012-08-17 11:24:18 -06:00
Ivan Delamer
8bab543531
Add a "NULL" output function for ipv6 by default, to avoid NULL
...
dereferencing in case of non-IPv6-enabled netifs (e.g. PPP).
Change-Id: I45f08ca89bfa0b8d61962f7052b11cc81a5e3cd1
2012-08-17 10:56:14 -06:00
goldsimon
bab8c82a35
fixed bug #36645 : Calling dhcp_release before dhcp_start dereferences NULL
2012-08-13 21:50:15 +02:00
goldsimon
b82bca7c99
fixed bug #36840 snmp_send_trap() NULL de-reference if traps configured but no interfaces available
2012-08-13 21:38:30 +02:00
goldsimon
556a2126b5
Fixed bug #36899 DNS TTL 0 is cached for a long time
2012-08-13 21:32:44 +02:00
goldsimon
a070751061
fixed bug #37052 : "netconn_alloc: undefined netconn_type" assertion skipped
2012-08-13 21:17:17 +02:00
goldsimon
847845027f
Merge branch 'master' of git.sv.gnu.org:/srv/git/lwip
2012-08-13 20:57:55 +02:00
goldsimon
c69914367d
Sanity-check the size of netif->hwaddr
2012-08-13 20:57:19 +02:00
Sylvain Rochet
48d364e269
Merge remote-tracking branch 'origin/master' into ppp-new
2012-07-24 23:17:15 +02:00
Sylvain Rochet
c58c27ed8b
removed time-based PPP phase state machine hacks from PPPoE dans PPPoL2TP
...
Our PPP phase state machine is now clean, we can safely remove time based
hacks in PPPoE dans PPPoL2TP.
2012-07-24 22:50:17 +02:00
James Smith
97b8abf16c
Fix bug #36857 : tcp_listen_dual_with_backlog() only works with ANY
...
address
Change-Id: I092a4c9978d88040214fc44a4c4b353be618d76c
2012-07-24 10:34:09 -06:00
Sylvain Rochet
59567b43b0
pcb->link_status_cb must be set, we don't need to check each time we use it if not NULL
2012-07-23 00:55:24 +02:00
Sylvain Rochet
e067e84d69
switch to phase dead if PPPoE or PPPoL2TP failed to connect
2012-07-23 00:48:27 +02:00
Sylvain Rochet
35c670513f
fixed some more PPP phase state machine issues
...
The only way PPPoE or PPPoL2TP disconnect it through ppp_link_terminated(),
therefore PPP is always already down, so we don't need to ask PPP to hup or stop.
2012-07-22 23:53:27 +02:00
Sylvain Rochet
8ec92b6fe7
don't call ppp_hup() and ppp_stop() if PPPoE or PPPoL2TP failed to connect
...
This is useless because PPP is not started yet, it confuses the PPP phase
state machine.
2012-07-22 23:37:35 +02:00
Sylvain Rochet
5552f082e8
handle cases when ppp_close() is called while session is in dead or holdoff phase
2012-07-22 21:42:56 +02:00
Sylvain Rochet
3c122117fc
improved PPP API, added ppp_reopen()
...
This is now the user choice to re-establish the session in the link status callback
by either calling the ppp_reopen() to re-establish or ppp_delete() to free the PPP
control block. Without user intervention, the PPP control block now stay in the dead
phase, allowing the user to re-establish or delete the control block later.
2012-07-22 20:53:54 +02:00
Sylvain Rochet
a467d21eba
ppp_close() PPPoL2TP support added
2012-07-22 18:05:19 +02:00
Sylvain Rochet
bc724ea206
Do not destroy the PPP control block automatically anymore, added ppp_delete() API function.
...
Without that, PPP user don't know when and how the PPP control block is free()ed, which
can lead to hard fault.
2012-07-22 17:20:40 +02:00
Sylvain Rochet
4ea5c1d973
improved persist mode, we now clear everything we can in the PPP control block structure, ensuring we start a new session from a clean state
2012-07-21 00:26:23 +02:00
Sylvain Rochet
c65883a727
UCHAR_MAX is defined in limits.h, I do not want to add any system include, replaced to 0xff
2012-07-16 20:09:49 +02:00
Sylvain Rochet
a4f6146667
removed some FIXME that are not relevant anymore
2012-07-15 15:57:54 +02:00
Sylvain Rochet
936c6c0d5c
reduced call stack by one when receiving a PPPoE disc packet
2012-07-15 15:12:40 +02:00
Sylvain Rochet
91af8878e1
saved some bytes from PPPoE control block, improved PADI retries
2012-07-15 15:07:07 +02:00
Sylvain Rochet
d2b2ae09e6
saving 14 bytes per PPPoE pbuf; not allocating struct eth_hdr two times per packet
2012-07-15 14:56:30 +02:00
Sylvain Rochet
94c35184a9
replaced PPPoL2TP printf() used to debug to PPPDEBUG a/o deletion
2012-07-14 17:47:30 +02:00
Sylvain Rochet
9e021cd1a8
improved PPP default interface management, added ppp_set_default() API call
2012-07-14 17:25:24 +02:00
Sylvain Rochet
78565026ac
L2TP output netif is now selectable, making it useful to select a default route for the L2TP tunnel, in case the default interface is set to the L2TP PPP interface
2012-07-12 01:11:08 +02:00
Sylvain Rochet
de6be743c6
added holdoff support for PPPoE and PPPoL2TP when persist mode is used
2012-07-11 23:50:33 +02:00
Sylvain Rochet
f534e80c71
added L2TPv2 (PPP over L2TP, a.k.a. UDP tunnels) support
...
Supported:
- L2TPv2 (PPP over L2TP, a.k.a. UDP tunnels)
- LAC
Not supported:
- LNS (require PPP server support)
- L2TPv3 ethernet pseudowires
- L2TPv3 VLAN pseudowire
- L2TPv3 PPP pseudowires
- L2TPv3 IP encapsulation
- L2TPv3 IP pseudowire
- L2TP tunnel switching - http://tools.ietf.org/html/draft-ietf-l2tpext-tunnel-switching-08
- Multiple tunnels per UDP socket, as well as multiple sessions per tunnel
- Hidden AVPs
2012-07-09 23:25:32 +02:00
Sylvain Rochet
0797ab6bc6
some buggy compiler get confused with duplicated labels used in enum tcp_state and fsm.h, prepending PPP's ones
2012-07-09 22:12:14 +02:00
Sylvain Rochet
b4df26a75d
some buggy compiler get confused with duplicated labels used in enum tcp_state and fsm.h, prepending PPP's ones
2012-07-09 22:04:09 +02:00
Sylvain Rochet
d92c462466
added PPP Sequential API module, based from the Network Interface Sequential API module
2012-07-07 19:50:56 +02:00
Sylvain Rochet
f31b905847
initialize PPP in the lwip_init() function
2012-07-07 17:33:34 +02:00
Sylvain Rochet
572e457e77
improved PPP API header documentation
2012-07-07 15:05:15 +02:00
Sylvain Rochet
be9b23a082
fixed LCP Echo Request/Reply feature
2012-07-07 12:16:48 +02:00
Sylvain Rochet
c9e7531251
Merge branch 'master' into ppp-new
2012-07-04 00:22:33 +02:00
Sylvain Rochet
90faecd86e
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
2012-07-03 22:59:50 +02:00
Ivan Delamer
6c12e5bfbe
Allow setting/getting socket option IPV6_V6ONLY for stream sockets
...
only, as datagram sockets do not support dual IP versions yet.
Change-Id: I2d89bdaa06b19dc0c553c7be6ac6e9a71d3ce8a5
2012-07-03 14:39:25 -06:00
Sylvain Rochet
2e069429c2
removed bool type, replaced by u8_t
2012-07-03 22:03:51 +02:00
James Smith
e65202f825
Applied patch by James Smith to implement IPV6_V6ONLY support in
...
sockets and netconns.
Change-Id: I2ecd8e218703114890b2d678cc1ccf997a16f5e3
2012-07-03 13:16:04 -06:00
Erik Ekman
11a3057e8e
PPP: Add option to skip FCS table
...
Option PPP_FCS_TABLE is created which controls if PPPoS FCS calculation
should be done against precalculated table or by using a short algorithm.
Default value is 1, keeps old behaviour.
Setting it to 0 saves around 0.5 kB flash.
2012-06-23 15:11:49 +02:00
Sylvain Rochet
ba0c619844
clarified PPP_INPROC_OWNTHREAD documentation
2012-06-23 13:46:51 +02:00
Sylvain Rochet
a83fb30836
fixed PPPoS multithread support
2012-06-23 13:07:43 +02:00
Sylvain Rochet
dc092653f4
now displaying sent packet before PPPoS add its escaping, trailing flags, ...
2012-06-23 12:04:27 +02:00
Sylvain Rochet
25c6278000
fixed some endianess issues with PPPoS
2012-06-23 02:27:03 +02:00
Sylvain Rochet
5033e0e752
display IPV6CP packets
2012-06-23 01:44:52 +02:00
Sylvain Rochet
295eeef9b6
"ISO C forbids conversion of function pointer to object pointer type" - removed callback function pointer display in debug messages. Anyway, this is quite a meaningless information.
2012-06-22 21:48:21 +02:00
Sylvain Rochet
f63b87e28b
setting tot_len before using it, oops
2012-06-22 21:43:22 +02:00
Sylvain Rochet
1f780e86d5
PPP timeouts required depend on the number of allowed PPP sessions
...
Furthermore we need up to 6 timeouts per PPP (AUTH + PAP|CHAP|EAP + LCP + IPCP + IP6CP + PPPoE)
This can be improved with more conditions.
2012-06-22 21:29:12 +02:00
Sylvain Rochet
408a56ffaf
phase must be set to initalize each time we try to reconnect
2012-06-22 20:48:08 +02:00
Sylvain Rochet
a84f5d52ff
added ppp_pcb to ppp callback
2012-06-22 19:59:46 +02:00
Sylvain Rochet
fb6eed0087
set LL addresses before bringing the interface up for IPv6
2012-06-22 19:45:45 +02:00
Sylvain Rochet
dc242a01b4
don't build ppp_netif_output_ip6() if PPP IPV6 support is disabled
2012-06-22 19:29:55 +02:00
Sylvain Rochet
074d3dd2b1
moved ipv6cp global variables to ppp_pcb
2012-06-22 19:27:03 +02:00
Sylvain Rochet
807afbc879
improved FSM structure size
2012-06-22 18:50:09 +02:00
Sylvain Rochet
8f1eeb1025
improved ipv6cp_options struct size
2012-06-22 18:23:07 +02:00
Sylvain Rochet
dd288f70ec
fixed sent PPPoE dump packet and copy everything we need after pppoe_xmit() free'd the pbuf
2012-06-22 18:07:59 +02:00
Sylvain Rochet
6a11134a18
fixed PPPoS suppport compilation
2012-06-22 17:53:39 +02:00
Sylvain Rochet
9b60b55f03
SNMP prefers tot_len
2012-06-22 17:48:31 +02:00
Sylvain Rochet
77aa06df64
improved ppp_write_over_ethernet(), don't MEMCPY the entire packet into a new pbuf
2012-06-22 17:03:59 +02:00
Sylvain Rochet
9b7860d6ec
merged ppp_write and ppp_write_pbuf
2012-06-22 14:17:35 +02:00
Sylvain Rochet
bda73b1bc9
replaced call from ppp_write to ppp_write_pbuf
2012-06-21 23:31:23 +02:00
Sylvain Rochet
8576ee0981
randomized seed when using MD5 random support and PPPoE
2012-06-21 23:08:20 +02:00
Sylvain Rochet
8093b55e86
don't destroy and create the PPP interface each time sifup() is called (it is actually called twice with IPv4 + IPv6 enabled)
2012-06-21 22:28:52 +02:00
Sylvain Rochet
b6db4a0e2e
PPP IPv6 local link support added
2012-06-21 18:05:17 +02:00
Sylvain Rochet
cd7894dfc9
added compilation macro to eui64.[ch] and cleaned unix-dependant code
2012-06-20 13:39:08 +02:00
Sylvain Rochet
c36d73f42a
added raw IPv6 PPP files
2012-06-20 13:29:21 +02:00
Sylvain Rochet
9871c4ff06
improved IPCP control structure size
2012-06-20 00:10:08 +02:00
Sylvain Rochet
e330983408
improved lcp_options structure size
2012-06-20 00:03:08 +02:00
Sylvain Rochet
4bbf443ba2
improved CHAP structure size, however there is not much we can do
2012-06-19 23:42:41 +02:00
Sylvain Rochet
0234c62c3e
improved PAP control structure size
2012-06-19 23:37:33 +02:00
Sylvain Rochet
0bdc27186d
some more improvements to ppp_pcb
2012-06-19 23:31:20 +02:00
Sylvain Rochet
c51c55b782
LCP and IPCP variable size improved
2012-06-19 23:25:57 +02:00
Sylvain Rochet
26250f1953
removed pcb->chap_mdtype_all
2012-06-19 23:14:31 +02:00
Sylvain Rochet
7ecfe6304a
reduced MTU/MRU variables
2012-06-19 23:03:47 +02:00
Sylvain Rochet
b7be03801c
improved much more ppp_pcb entry size
2012-06-19 22:53:38 +02:00
Sylvain Rochet
b21cb8a396
removed pcb->num if PPP debug is not compiled
2012-06-19 22:08:14 +02:00
Sylvain Rochet
eadd56a376
replaced exit code (pcb->status) with ppp_ioctl()
2012-06-19 22:00:12 +02:00