• G
    L2TP: Re-enable per session logs · 64d3b900
    Guillaume Nault 提交于
    Use a triton context per session so that log_ppp_*() functions can
    prepend log messages with PPP session information.
    
    Since functions must now be called within the right context,
    allocating and freeing sessions is done in the following manner:
      * Tunnels allocate new sessions within their own context and
        activate the new session's context just before answering
        the ICRQ.
      * Freeing sessions is slightly more complex. The session is
        first removed from its tunnel session list (done within the
        tunnel context), then the session itself if disconnected and
        freed (done within the session context).
    
    The l2tp_tunnel_*() and the l2tp_session_*() functions must now be
    used within tunnel and session contexts respectively.
    Signed-off-by: NGuillaume Nault <g.nault@alphalink.fr>
    64d3b900
l2tp.c 38.1 KB