• Guillaume Nault's avatar
    l2tp: define helper for parsing struct sockaddr_pppol2tp* · a408194a
    Guillaume Nault authored
    'sockaddr_len' is checked against various values when entering
    pppol2tp_connect(), to verify its validity. It is used again later, to
    find out which sockaddr structure was passed from user space. This
    patch combines these two operations into one new function in order to
    simplify pppol2tp_connect().
    
    A new structure, l2tp_connect_info, is used to pass sockaddr data back
    to pppol2tp_connect(), to avoid passing too many parameters to
    l2tp_sockaddr_get_info(). Also, the first parameter is void* in order
    to avoid casting between all sockaddr_* structures manually.
    Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a408194a
l2tp_ppp.c 47.3 KB