1. 04 4月, 2010 4 次提交
    • J
      l2tp: Add netlink control API for L2TP · 309795f4
      James Chapman 提交于
      In L2TPv3, we need to create/delete/modify/query L2TP tunnel and
      session contexts. The number of parameters is significant. So let's
      use netlink. Userspace uses this API to control L2TP tunnel/session
      contexts in the kernel.
      
      The previous pppol2tp driver was managed using [gs]etsockopt(). This
      API is retained for backwards compatibility. Unlike L2TPv2 which
      carries only PPP frames, L2TPv3 can carry raw ethernet frames or other
      frame types and these do not always have an associated socket
      family. Therefore, we need a way to use L2TP sessions that doesn't
      require a socket type for each supported frame type. Hence netlink is
      used.
      Signed-off-by: NJames Chapman <jchapman@katalix.com>
      Reviewed-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      309795f4
    • J
      l2tp: Add L2TPv3 IP encapsulation (no UDP) support · 0d76751f
      James Chapman 提交于
      This patch adds a new L2TPIP socket family and modifies the core to
      handle the case where there is no UDP header in the L2TP
      packet. L2TP/IP uses IP protocol 115. Since L2TP/UDP and L2TP/IP
      packets differ in layout, the datapath packet handling code needs
      changes too. Userspace uses an L2TPIP socket instead of a UDP socket
      when IP encapsulation is required.
      
      We can't use raw sockets for this because the semantics of raw sockets
      don't lend themselves to the socket-per-tunnel model - we need to
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d76751f
    • J
      l2tp: Add L2TPv3 protocol support · f7faffa3
      James Chapman 提交于
      The L2TPv3 protocol changes the layout of the L2TP packet
      header. Tunnel and session ids change from 16-bit to 32-bit values,
      data sequence numbers change from 16-bit to 24-bit values and PPP-specific
      fields are moved into protocol-specific subheaders.
      
      Although this patch introduces L2TPv3 protocol support, there are no
      userspace interfaces to create L2TPv3 sessions yet.
      Signed-off-by: NJames Chapman <jchapman@katalix.com>
      Reviewed-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f7faffa3
    • J
      l2tp: Split pppol2tp patch into separate l2tp and ppp parts · fd558d18
      James Chapman 提交于
      This patch splits the pppol2tp driver into separate L2TP and PPP parts
      to prepare for L2TPv3 support. In L2TPv3, protocols other than PPP can
      be carried, so this split creates a common L2TP core that will handle
      the common L2TP bits which protocol support modules such as PPP will
      use.
      
      Note that the existing pppol2tp module is split into l2tp_core and
      l2tp_ppp by this change.
      
      There are no feature changes here. Internally, however, there are
      significant changes, mostly to handle the separation of PPP-specific
      data from the L2TP session and to provide hooks in the core for
      modules like PPP to access.
      Signed-off-by: NJames Chapman <jchapman@katalix.com>
      Reviewed-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd558d18