#
a48ff4aa |
|
14-Jun-2018 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE: fix trivial build error lwip/src/netif/ppp/pppoe.c: In function ‘pppoe_send_padt’: lwip/src/netif/ppp/pppoe.c:1048:108: error: ‘sc’ undeclared (first use in this function) sc is not passed to ‘pppoe_send_padt’ function because it might be called to terminate unknown sessions. Fixes: d4047ea1d185 ("Try to fix issues reported by coverity") Signed-off-by: Sylvain Rochet <gradator@gradator.net>
|
#
d4047ea1 |
|
12-Feb-2018 |
goldsimon <goldsimon@gmx.de> |
Try to fix issues reported by coverity
|
#
9d087ad2 |
|
03-Feb-2018 |
goldsimon <goldsimon@gmx.de> |
Add LWIP_ASSERT_CORE_LOCKED() to ppp (see task #14780) Signed-off-by: goldsimon <goldsimon@gmx.de>
|
#
991f7513 |
|
08-Aug-2017 |
goldsimon <goldsimon@gmx.de> |
Even more pbuf_header -> pbuf_add/remove_header replacements (also in strings)
|
#
07434aa7 |
|
08-Aug-2017 |
goldsimon <goldsimon@gmx.de> |
More pbuf_header -> pbuf_add/remove_header replacements
|
#
4171f39a |
|
05-May-2017 |
Sylvain Rochet <gradator@gradator.net> |
PPP: remove ppp_singlebuf We don't have to keep a helper function just for the sake of a PBUF_RAW constant. Inline ppp_singlebuf function. Signed-off-by: Sylvain Rochet <gradator@gradator.net>
|
#
f00d7db4 |
|
03-May-2017 |
goldsimon <goldsimon@gmx.de> |
backport of "variable assigned but not used" warnings from STM (why don't people report such things?)
|
#
e16d10ad |
|
08-Mar-2017 |
Sylvain Rochet <gradator@gradator.net> |
PPP: remove unused and confusing return values other than ERR_OK for ppp_connect and ppp_listen User should not use ppp_connect or ppp_listen return value to retry later, it must wait for the callback to be called. This is primarily done this way to have a consistent behavior with and without the holdoff feature. Remove returned error value from PPP link level API connect and listen callbacks because we are not using them anymore, then make ppp_connect or ppp_listen to always return ERR_OK, thus we are not breaking the PPP user API. We don't need the return code here, all PPP link level drivers can't fail at all (e.g. PPPoS) or retry if necessary (PPPoE and PPPoL2TP).
|
#
13fb616b |
|
05-Oct-2016 |
Dirk Ziegelmeier <dirk@ziegelmeier.net> |
Cleanup hton*/ntoh* function handling and platform abstraction Let lwip use functions/macros prefixed by lwip_ internally to avoid naming clashes with external #includes. Remove over-complicated #define handling in def.h Make functions easier to override in cc.h. The following is sufficient now (no more LWIP_PLATFORM_BYTESWAP): #define lwip_htons(x) <your_htons> #define lwip_htonl(x) <your_htonl>
|
#
64f79e7f |
|
19-Aug-2016 |
Axel Lin <axel.lin@ingics.com> |
PPP, PPPoE: Include netif/ethernet.h to fix build error Fix below build errors: In file included from ../../../../../lwip/src/include/netif/ppp/ppp_opts.h:31:0, from ../../../../../lwip/src/netif/ppp/pppoe.c:71: ../../../../../lwip/src/netif/ppp/pppoe.c: In function ‘pppoe_timeout’: ../../../../../lwip/src/netif/ppp/pppoe.c:861:30: error: ‘ethbroadcast’ undeclared (first use in this function) MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest)); ^ ../../../../../lwip/src/include/lwip/opt.h:137:52: note: in definition of macro ‘MEMCPY’ #define MEMCPY(dst,src,len) memcpy(dst,src,len) ^ ../../../../../lwip/src/netif/ppp/pppoe.c:861:30: note: each undeclared identifier is reported only once for each function it appears in MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest)); ^ ../../../../../lwip/src/include/lwip/opt.h:137:52: note: in definition of macro ‘MEMCPY’ #define MEMCPY(dst,src,len) memcpy(dst,src,len) ^ ../../../../../lwip/src/netif/ppp/pppoe.c: In function ‘pppoe_connect’: ../../../../../lwip/src/netif/ppp/pppoe.c:899:24: error: ‘ethbroadcast’ undeclared (first use in this function) MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest)); ^ ../../../../../lwip/src/include/lwip/opt.h:137:52: note: in definition of macro ‘MEMCPY’ #define MEMCPY(dst,src,len) memcpy(dst,src,len) ^ ../../Common.mk:94: recipe for target 'pppoe.o' failed make: *** [pppoe.o] Error 1 Fixes: 8eb9db18a2d9 ("Reduce usage of netif/ethernet.h header, mostly lwip/prot/ethernet.h is sufficient") Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: goldsimon <goldsimon@gmx.de>
|
#
85ab3998 |
|
08-Aug-2016 |
Dirk Ziegelmeier <dirk@ziegelmeier.net> |
Fix a few incorrect uses of err_t. Found by converting lwip error codes to an enum, but I'm not sure wether I want to commit the actual enum conversion.
|
#
953dd5b6 |
|
07-Aug-2016 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE: remove useless checks pppoe_softc_list is always not null when pppoe_find_softc_by_session is called, furthermore pppoe_softc_list being null here does not hurt. session is still checked whatsoever in pppoe_find_softc_by_session, prechecking the session value for a value which can't really happen except for forged frames does not add any value.
|
#
1ea10269 |
|
07-Aug-2016 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE: cleanup connection state reset Instead of relying on cleanup at the end of session, cleanup as much as possible in the connect callback. It removes duplicated code and make everything simpler to read. While we are at it, remove useless initialization code from create and connect functions.
|
#
7c02a854 |
|
07-Aug-2016 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE: add support for disconnecting in link initiation state in disconnect callback Disconnect callback does not currently support a disconnect event while initiation is in progress. Retry timer is not stopped and PADT frame is sent whatever the current state is. PADT frame can only be sent if we received a PADS frame, otherwise sc_session is 0 and sending a PADT frame is meaningless. Fix both issues to allow calling the disconnect callback whatever the PPPoE state is.
|
#
c2a5480a |
|
04-Aug-2016 |
Sylvain Rochet <gradator@gradator.net> |
PPP: remove useless ppp_link_start function This function only set PPP to initialize phase, and it is only called at the very beginning of functions where it is called. It means we could as well set the initialize phase before calling those functions in the PPP core.
|
#
9b47b639 |
|
04-Aug-2016 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE: remove useless PPPoE state conditions sc->sc_ethif can't be NULL, it is set definitively in pppoe_create. PPPoE can't by anything else than PADI sent in pppoe_send_padi, it is only called when this is true. PPPoE state can't be anything else than initial state in pppoe_connect, this function is called from PPP core only when PPP is in the dead phase, if PPP is in the dead phase it means the link protocol is dead as well. PPPoE can't be anything else than data phase in pppoe_disconnect this function is only called by PPP core only when PPP session is up, if PPP session is UP it means the link protocol is UP as well. PPPoE can't by anything else than PADR sent in pppoe_send_padr, it is only called when this is true. PPPoE can't by anything else than PADO sent in pppoe_send_pado, it is only called when this is true. PPPoE can't by anything else than PADO sent in pppoe_send_pads, it is only called when this is true. PPPoE can't be anything else than session phase in pppoe_xmit, function is only called by pppoe_write and pppoe_netif_output which are both called by PPP core only when PPP session is up, if PPP session is UP it means the link protocol is UP as well.
|
#
5d4c1432 |
|
18-Jul-2016 |
Dirk Ziegelmeier <dirk@ziegelmeier.net> |
Fix bug #48436: Naming clash for timers.c (with FreeRTOS) Rename timers.* to timeouts.*
|
#
f0dbba64 |
|
02-Jul-2016 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE, PPPoL2TP: enforce disabling of silent and passive modes PPP is just the upper protocol for PPPoE and PPPoL2TP, meaning it is only started once "E" or L2TP is established. Therefore waiting indefinitely for LCP packets on the PPP side does not make sense at all, if the lower level protocol is UP, PPP *MUST* comes up as well or we should restart from the beginning.
|
#
b438a0d6 |
|
02-Jul-2016 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE: fix potential out-of-bound if AC cookie is too long Found by coverity. Introduced by c0e7d54e37 "Removed 2 mem_mallocs: error string can be a global variable, include memory for sc_ac_cookie in struct pppoe_softc; commented out unused code (sc_service_name/sc_concentrator_name)". Fixes it by bailing out if received AC cookie is to big for us, this can't really happen anyway.
|
#
7b4bd334 |
|
19-Jun-2016 |
Sylvain Rochet <gradator@gradator.net> |
PPP, rename ppp_clear function to ppp_link_start This function does not clear anything anymore. What it is now is an optional way to notify PPP that link layer is started, changing the PPP state from "dead" to "initialize". Rename it accordingly to what the function really is.
|
#
ffa340a6 |
|
25-Apr-2016 |
Dirk Ziegelmeier <dirk@ziegelmeier.net> |
task #13907: PPP cleanups: Move PPP mempools out of lwIP core to PPP code
|
#
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
|
#
62037370 |
|
12-Nov-2015 |
Dirk Ziegelmeier <dirk@ziegelmeier.net> |
Rename snmp_mib2.h to snmp.h so source compatibility for user netif implementations is preserved
|
#
c15b3578 |
|
13-Sep-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, merged ppp_link_set_callbacks() into ppp_new()
|
#
46204a9f |
|
13-Sep-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, reorder initialisation of low level protocols to call ppp_link_set_callbacks() just after PPP control block allocation
|
#
5b07569e |
|
13-Sep-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, remove now unused ioctl callback from link_callbacks structure
|
#
8a0fb03e |
|
08-Sep-2015 |
goldsimon <goldsimon@gmx.de> |
Separate mib2 counter/table callbacks from snmp agent. This both cleans up the code and should allow integration of a 3rd party agent/mib2.
|
#
0a8b1c19 |
|
26-Apr-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, added missing cast on pbuf_header()
|
#
b302cad4 |
|
19-Apr-2015 |
Sylvain Rochet <gradator@gradator.net> |
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.
|
#
bcfaeca3 |
|
12-Apr-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE, removed unnecessary single pbuf Removed ppp_singlebuf() in pppoe_data_input(), chained pbuf are perfectly acceptable for IP data and we are currently supporting them perfectly for PPPoS. The PPP stack itself (LCP, IPCP et al.) does not support chained pbuf and is already calling ppp_singlebuf() just before passing packet to the protocol handler.
|
#
c37ecb15 |
|
15-Mar-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, cleared warnings if PPP_DEBUG is off
|
#
5097ac05 |
|
14-Mar-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, fixed warnings if LWIP_SNMP is disabled
|
#
8974b12a |
|
13-Mar-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE, removed redundant size check
|
#
50336aae |
|
13-Mar-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, ppp->last_xmit is only used in PPPoS, moved to PPPoS Only PPPoS need to keep track of last transmitted packet for HDLC flag, removed from PPPoE and PPPoL2TP and moved to PPPoS.
|
#
a60f2588 |
|
10-Mar-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE and PPPoL2TP, removed ppp->pcomp usage We refuse protocol compression in both PPPoE and PPPoL2TP, therefore ppp->pcomp can't be true, removed.
|
#
dbacfe0a |
|
08-Mar-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, IPCP, fully removed VJ support from IPCP if VJ_SUPPORT is disabled
|
#
b09c8912 |
|
01-Mar-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE, removed devname variable from pppoe_disc_input() Only used for debug, reworked in a more clever way. It was actually broken by design: setting an interface integer into a string without formatting was quite a dumb idea.
|
#
d28bb04a |
|
01-Mar-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE, improve reliability if we receive a PADT Don't disconnect when we receive a PADT, we let the LCP Echo/Reply find the fact that PPP session is down. Asking the PPP stack to end the session require strict checking about the PPP phase to prevent endless disconnection loops. Luckily it previously does nothing because PADT frames are rarely sent with a hunique tag and we only set the sc pointer if we receive a hunique tag.
|
#
9de1c71f |
|
01-Mar-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE, removed global static buffer only used for debug pppoe_error_tmp[] was only used in one function and only for debug purposes, moved to stack.
|
#
371bc91d |
|
28-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, SERVER: added PPPoS server support New function: ppp_listen(), listen for an incoming PPP connection.
|
#
89771de6 |
|
28-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, remove VJ callback from link_callbacks if VJ support is not enabled
|
#
00e8988b |
|
21-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, IPv4 support is now optional New compile time option: PPP_IPV4_SUPPORT PPP IPv4 support can now be compiled out.
|
#
b31f6eb4 |
|
20-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE, removed PPPERR_ usage Low level protocol callbacks are using err_t returns type, don't use PPPERR_ on them.
|
#
29f3f2e1 |
|
19-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoS, moved VJ protocol handler to PPPoS New callback, netif input, allow low level drivers to extend ppp_input call, moved PPPoS VJ support to pppos.c.
|
#
729e24da |
|
19-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoS, added sub-ioctl commands Allow low level drivers to extend ioctl call, moved PPPoS ioctl commands to pppos.c.
|
#
ec362536 |
|
19-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, uniformised callbacks naming
|
#
b92fe3ee |
|
19-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, CORE, new callbacks, send_config, recv_config, vj_config Removed some calls from PPP core to PPPoS low level protocols, the const struct allows us to have more and more callbacks without using more RAM.
|
#
985de035 |
|
19-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, CORE, now using const callbacks struct from lower level protocols Saving some RAM by using callbacks struct in rodata for required callbacks called by PPP core to PPP low level protocols.
|
#
8a8cba75 |
|
17-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, lower protocols, chained returns from local functions to callback caller PPPoS,PPPoE,PPPoL2TP functions using non-void returns are now propagated to callback caller (PPP core).
|
#
1ae3808e |
|
17-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, CORE, prepared for lower protocols callbacks returning state Until now, callbacks used void return, preparing callbacks to return PPPERR_ status.
|
#
ee2936ff |
|
17-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, all protocols, uniformised naming Uniformised fonction naming between and inside PPPoS, PPPoE, PPPoL2TP.
|
#
18074ff9 |
|
17-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE, improved removal from linked list Replaced naive link list removal code to a more clever one.
|
#
e6465a6f |
|
15-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoS, moved VJ from PPP core to PPPoS VJ is only available for PPPoS, moved VJ from PPP CORE to PPPoS.
|
#
09b44858 |
|
15-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, generalized callbacks calls from PPP core, removed all PPPoE and PPPoL2TP references Almost there, removed all PPPoE and PPPoL2TP references from PPP core, using the generic callbacks interface everywhere.
|
#
19282d6d |
|
15-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, moved low level protocol connect init to low level protocol files Low level protocol init machine state does not belong to PPP core, moved those init to respective low level protocol files.
|
#
ee85aacc |
|
15-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, removed low level create functions from PPP core ppp_over_ethernet_create() moved from ppp.c to pppoe.c ppp_over_l2tp_create() moved from ppp.c to pppol2tp.c
|
#
0afc34f6 |
|
15-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, moved ppp_write and ppp_netif_output low level protocols functions to respective low level protocol files Moved ppp_write_over_ethernet() and ppp_netif_output_over_ethernet() to pppoe.c Moved ppp_write_over_l2tp() and ppp_netif_output_over_l2tp() to pppol2tp.c
|
#
45bfccfd |
|
15-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP, prepare new callbacks for low level protocols New callbacks: write and netif_output
|
#
f8501478 |
|
15-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP: prepared callbacks from PPP core to low level protocols New PPP callback from PPP core to low level protocols, first step about removing named calls to low level protocols from PPP core.
|
#
80809841 |
|
14-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP: removed PPPoE and PPPoL2TP callback status notifier Added necessary PPP core functions for PPPoE and PPPoL2TP status notificaton (ppp_link_failed and ppp_link_end), removed callback, low level protocol are now calling PPP core "link" functions.
|
#
74fd2dc9 |
|
14-Feb-2015 |
Sylvain Rochet <gradator@gradator.net> |
PPP: moved ppp_new() to low level protocol init for PPPoE and PPPoL2TP First step of a rework of how low level protocols are using the PPP core. Low level protocols are now going to use the core instead of core using the low level protocols. Final goal: separate PPP core code from low level protocols.
|
#
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
|
#
a7745e9a |
|
19-Apr-2014 |
Sylvain Rochet <gradator@gradator.net> |
PPP, PPPoE, fixed bug #42138, pppoe_destroy() called with wrong pointer, PPPoE control block was never freed
|
#
e5a554f0 |
|
13-Oct-2012 |
Sylvain Rochet <gradator@gradator.net> |
PPP, adding const pragma to FSM callbacks, saving about 350 bytes in .data segment
|
#
1ddebcc8 |
|
18-Aug-2012 |
Sylvain Rochet <gradator@gradator.net> |
Moved PPP headers into include/netif/ppp/, fixing bug #37040.
|