• Cong Wang's avatar
    l2tp: convert l2tp_tunnel_list to idr · c4d48a58
    Cong Wang authored
    l2tp uses l2tp_tunnel_list to track all registered tunnels and
    to allocate tunnel ID's. IDR can do the same job.
    
    More importantly, with IDR we can hold the ID before a successful
    registration so that we don't need to worry about late error
    handling, it is not easy to rollback socket changes.
    
    This is a preparation for the following fix.
    
    Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Cc: Guillaume Nault <gnault@redhat.com>
    Cc: Jakub Sitnicki <jakub@cloudflare.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Tom Parkin <tparkin@katalix.com>
    Signed-off-by: default avatarCong Wang <cong.wang@bytedance.com>
    Reviewed-by: default avatarGuillaume Nault <gnault@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c4d48a58
l2tp_core.c 45.1 KB