07 Apr, 2010

9 commits


06 Apr, 2010

16 commits


04 Apr, 2010

15 commits

  • Followup to commit 789a4a2c
    (l2tp: Add support for static unmanaged L2TPv3 tunnels)

    One missing init in l2tp_tunnel_sock_create() could access random kernel
    memory, and a bit field should be unsigned.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Change SCTP IPv6 code to use ipv6_addr_copy()

    Signed-off-by: Brian Haley
    Signed-off-by: David S. Miller

    Brian Haley
     
  • When ip_append() fails because of socket limit or memory shortage,
    increment ICMP_MIB_OUTERRORS counter, so that "netstat -s" can report
    these errors.

    LANG=C netstat -s | grep "ICMP messages failed"
    0 ICMP messages failed

    For IPV6, implement ICMP6_MIB_OUTERRORS counter as well.

    # grep Icmp6OutErrors /proc/net/dev_snmp6/*
    /proc/net/dev_snmp6/eth0:Icmp6OutErrors 0
    /proc/net/dev_snmp6/lo:Icmp6OutErrors 0

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • smc91c92_cs:
    *cvt_ascii_address returns 0, if success.
    *call free_netdev, if we can't find hardware address.

    Signed-off-by: Ken Kawasaki
    Signed-off-by: David S. Miller

    Ken Kawasaki
     
  • We have to check CONFIG_L2TP_DEBUGFS_MODULE as well as
    CONFIG_L2TP_DEBUGFS.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch adds documentation about the L2TPv3 functionality.

    Signed-off-by: James Chapman
    Reviewed-by: Randy Dunlap
    Signed-off-by: David S. Miller

    James Chapman
     
  • This patch adds support for static (unmanaged) L2TPv3 tunnels, where
    the tunnel socket is created by the kernel rather than being created
    by userspace. This means L2TP tunnels and sessions can be created
    manually, without needing an L2TP control protocol implemented in
    userspace. This might be useful where the user wants a simple ethernet
    over IP tunnel.

    A patch to iproute2 adds a new command set under "ip l2tp" to make use
    of this feature. This will be submitted separately.

    Signed-off-by: James Chapman
    Reviewed-by: Randy Dunlap
    Signed-off-by: David S. Miller

    James Chapman
     
  • The existing pppol2tp driver exports debug info to
    /proc/net/pppol2tp. Rather than adding info to that file for the new
    functionality added in this patch series, we add new files in debugfs,
    leaving the old /proc file for backwards compatibility (L2TPv2 only).

    Currently only one file is provided: l2tp/tunnels, which lists
    internal debug info for all l2tp tunnels and sessions. More files may
    be added later. The info is for debug and problem analysis only -
    userspace apps should use netlink to obtain status about l2tp tunnels
    and sessions.

    Although debugfs does not support net namespaces, the tunnels and
    sessions dumped in l2tp/tunnels are only those in the net namespace of
    the process reading the file.

    Signed-off-by: James Chapman
    Signed-off-by: David S. Miller

    James Chapman
     
  • This driver presents a regular net_device for each L2TP ethernet
    pseudowire instance. These interfaces are named l2tpethN by default,
    though userspace can specify an alternative name when the L2TP
    session is created, if preferred. When the pseudowire is established,
    regular Linux networking utilities may be used to configure the
    interface, i.e. give it IP address info or add it to a bridge. Any
    data passed over the interface is carried over an L2TP tunnel.

    Signed-off-by: James Chapman
    Reviewed-by: Randy Dunlap
    Signed-off-by: David S. Miller

    James Chapman
     
  • Reader/write locks are discouraged because they are slower than spin
    locks. So this patch converts the rwlocks used in the per_net structs
    to rcu.

    Signed-off-by: James Chapman
    Signed-off-by: David S. Miller

    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: James Chapman
    Reviewed-by: Randy Dunlap
    Signed-off-by: David S. Miller

    James Chapman
     
  • This lets kernel modules which use genl netlink APIs serialize netlink
    processing.

    Signed-off-by: James Chapman
    Reviewed-by: Randy Dunlap
    Signed-off-by: David S. Miller

    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: David S. Miller

    James Chapman
     
  • This patch makes changes to the L2TP PPP code for L2TPv3.

    The existing code has some assumptions about the L2TP header which are
    broken by L2TPv3. Also the sockaddr_pppol2tp structure of the original
    code is too small to support the increased size of the L2TPv3 tunnel
    and session id, so a new sockaddr_pppol2tpv3 structure is needed. In
    the socket calls, the size of this structure is used to tell if the
    operation is for L2TPv2 or L2TPv3.

    Signed-off-by: James Chapman
    Reviewed-by: Randy Dunlap
    Signed-off-by: David S. Miller

    James Chapman