04 Feb, 2017

2 commits

  • [ Upstream commit 88ff7334f25909802140e690c0e16433e485b0a0 ]

    Modules implementing lwtunnel ops should not be allowed to unload
    while there is state alive using those ops, so specify the owning
    module for all lwtunnel ops.

    Signed-off-by: Robert Shearman
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Robert Shearman
     
  • [ Upstream commit 9f427a0e474a67b454420c131709600d44850486 ]

    MPLS multipath for LSR is broken -- always selecting the first nexthop
    in the one label case. For example:

    $ ip -f mpls ro ls
    100
    nexthop as to 200 via inet 172.16.2.2 dev virt12
    nexthop as to 300 via inet 172.16.3.2 dev virt13
    101
    nexthop as to 201 via inet6 2000:2::2 dev virt12
    nexthop as to 301 via inet6 2000:3::2 dev virt13

    In this example incoming packets have a single MPLS labels which means
    BOS bit is set. The BOS bit is passed from mpls_forward down to
    mpls_multipath_hash which never processes the hash loop because BOS is 1.

    Update mpls_multipath_hash to process the entire label stack. mpls_hdr_len
    tracks the total mpls header length on each pass (on pass N mpls_hdr_len
    is N * sizeof(mpls_shim_hdr)). When the label is found with the BOS set
    it verifies the skb has sufficient header for ipv4 or ipv6, and find the
    IPv4 and IPv6 header by using the last mpls_hdr pointer and adding 1 to
    advance past it.

    With these changes I have verified the code correctly sees the label,
    BOS, IPv4 and IPv6 addresses in the network header and icmp/tcp/udp
    traffic for ipv4 and ipv6 are distributed across the nexthops.

    Fixes: 1c78efa8319ca ("mpls: flow-based multipath selection")
    Acked-by: Robert Shearman
    Signed-off-by: David Ahern
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    David Ahern
     

06 Dec, 2016

1 commit


03 Oct, 2016

1 commit


02 Sep, 2016

1 commit


31 Aug, 2016

2 commits

  • As reported by Lennert the MPLS GSO code is failing to properly segment
    large packets. There are a couple of problems:

    1. the inner protocol is not set so the gso segment functions for inner
    protocol layers are not getting run, and

    2 MPLS labels for packets that use the "native" (non-OVS) MPLS code
    are not properly accounted for in mpls_gso_segment.

    The MPLS GSO code was added for OVS. It is re-using skb_mac_gso_segment
    to call the gso segment functions for the higher layer protocols. That
    means skb_mac_gso_segment is called twice -- once with the network
    protocol set to MPLS and again with the network protocol set to the
    inner protocol.

    This patch sets the inner skb protocol addressing item 1 above and sets
    the network_header and inner_network_header to mark where the MPLS labels
    start and end. The MPLS code in OVS is also updated to set the two
    network markers.

    >From there the MPLS GSO code uses the difference between the network
    header and the inner network header to know the size of the MPLS header
    that was pushed. It then pulls the MPLS header, resets the mac_len and
    protocol for the inner protocol and then calls skb_mac_gso_segment
    to segment the skb.

    Afterward the inner protocol segmentation is done the skb protocol
    is set to mpls for each segment and the network and mac headers
    restored.

    Reported-by: Lennert Buytenhek
    Signed-off-by: David Ahern
    Signed-off-by: David S. Miller

    David Ahern
     
  • Today mpls iptunnel lwtunnel_output redirect expects the tunnel
    output function to handle fragmentation. This is ok but can be
    avoided if we did not do the mpls output redirect too early.
    ie we could wait until ip fragmentation is done and then call
    mpls output for each ip fragment.

    To make this work we will need,
    1) the lwtunnel state to carry encap headroom
    2) and do the redirect to the encap output handler on the ip fragment
    (essentially do the output redirect after fragmentation)

    This patch adds tunnel headroom in lwtstate to make sure we
    account for tunnel data in mtu calculations during fragmentation
    and adds new xmit redirect handler to redirect to lwtunnel xmit func
    after ip fragmentation.

    This includes IPV6 and some mtu fixes and testing from David Ahern.

    Signed-off-by: Roopa Prabhu
    Signed-off-by: David Ahern
    Signed-off-by: David S. Miller

    Roopa Prabhu
     

10 Jul, 2016

1 commit


17 Jun, 2016

1 commit

  • This appears to be necessary and sufficient to provide
    MPLS in GRE (RFC4023) support.

    This can be used by establishing an ipgre tunnel device
    and then routing MPLS over it.

    The following example will forward MPLS frames received with an outermost
    MPLS label 100 over tun1, a GRE tunnel. The forwarded packet will have the
    outermost MPLS LSE removed and two new LSEs added with labels 200
    (outermost) and 300 (next).

    ip link add name tun1 type gre remote 10.0.99.193 local 10.0.99.192 ttl 225
    ip link set up dev tun1
    ip addr add 10.0.98.192/24 dev tun1
    ip route sh

    echo 1 > /proc/sys/net/mpls/conf/eth0/input
    echo 101 > /proc/sys/net/mpls/platform_labels
    ip -f mpls route add 100 as 200/300 via inet 10.0.98.193
    ip -f mpls route sh

    Also remove unnecessary braces.

    Reviewed-by: Dinan Gunawardena
    Signed-off-by: Simon Horman
    Acked-by: Robert Shearman
    Signed-off-by: David S. Miller

    Simon Horman
     

04 Jun, 2016

1 commit

  • skb_gso_network_seglen is not enough for checking fragment sizes if
    skb is using GSO_BY_FRAGS as we have to check frag per frag.

    This patch introduces skb_gso_validate_mtu, based on the former, which
    will wrap the use case inside it as all calls to skb_gso_network_seglen
    were to validate if it fits on a given TMU, and improve the check.

    Signed-off-by: Marcelo Ricardo Leitner
    Tested-by: Xin Long
    Signed-off-by: David S. Miller

    Marcelo Ricardo Leitner
     

21 May, 2016

1 commit

  • In several gso_segment functions there are checks of gso_type against
    a seemingly arbitrary list of SKB_GSO_* flags. This seems like an
    attempt to identify unsupported GSO types, but since the stack is
    the one that set these GSO types in the first place this seems
    unnecessary to do. If a combination isn't valid in the first
    place that stack should not allow setting it.

    This is a code simplication especially for add new GSO types.

    Signed-off-by: Tom Herbert
    Signed-off-by: David S. Miller

    Tom Herbert
     

15 Apr, 2016

1 commit

  • This patch adds support for TSO using IPv4 headers with a fixed IP ID
    field. This is meant to allow us to do a lossless GRO in the case of TCP
    flows that use a fixed IP ID such as those that convert IPv6 header to IPv4
    headers.

    In addition I am adding a feature that for now I am referring to TSO with
    IP ID mangling. Basically when this flag is enabled the device has the
    option to either output the flow with incrementing IP IDs or with a fixed
    IP ID regardless of what the original IP ID ordering was. This is useful
    in cases where the DF bit is set and we do not care if the original IP ID
    value is maintained.

    Signed-off-by: Alexander Duyck
    Signed-off-by: David S. Miller

    Alexander Duyck
     

09 Apr, 2016

1 commit

  • find_outdev calls inet{,6}_fib_lookup_dev() or dev_get_by_index() to
    find the output device. In case of an error, inet{,6}_fib_lookup_dev()
    returns error pointer and dev_get_by_index() returns NULL. But the function
    only checks for NULL and thus can end up calling dev_put on an ERR_PTR.
    This patch adds an additional check for err ptr after the NULL check.

    Before: Trying to add an mpls route with no oif from user, no available
    path to 10.1.1.8 and no default route:
    $ip -f mpls route add 100 as 200 via inet 10.1.1.8
    [ 822.337195] BUG: unable to handle kernel NULL pointer dereference at
    00000000000003a3
    [ 822.340033] IP: [] mpls_nh_assign_dev+0x10b/0x182
    [ 822.340033] PGD 1db38067 PUD 1de9e067 PMD 0
    [ 822.340033] Oops: 0000 [#1] SMP
    [ 822.340033] Modules linked in:
    [ 822.340033] CPU: 0 PID: 11148 Comm: ip Not tainted 4.5.0-rc7+ #54
    [ 822.340033] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
    BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org
    04/01/2014
    [ 822.340033] task: ffff88001db82580 ti: ffff88001dad4000 task.ti:
    ffff88001dad4000
    [ 822.340033] RIP: 0010:[] []
    mpls_nh_assign_dev+0x10b/0x182
    [ 822.340033] RSP: 0018:ffff88001dad7a88 EFLAGS: 00010282
    [ 822.340033] RAX: ffffffffffffff9b RBX: ffffffffffffff9b RCX:
    0000000000000002
    [ 822.340033] RDX: 00000000ffffff9b RSI: 0000000000000008 RDI:
    0000000000000000
    [ 822.340033] RBP: ffff88001ddc9ea0 R08: ffff88001e9f1768 R09:
    0000000000000000
    [ 822.340033] R10: ffff88001d9c1100 R11: ffff88001e3c89f0 R12:
    ffffffff8187e0c0
    [ 822.340033] R13: ffffffff8187e0c0 R14: ffff88001ddc9e80 R15:
    0000000000000004
    [ 822.340033] FS: 00007ff9ed798700(0000) GS:ffff88001fc00000(0000)
    knlGS:0000000000000000
    [ 822.340033] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [ 822.340033] CR2: 00000000000003a3 CR3: 000000001de89000 CR4:
    00000000000006f0
    [ 822.340033] Stack:
    [ 822.340033] 0000000000000000 0000000100000000 0000000000000000
    0000000000000000
    [ 822.340033] 0000000000000000 0801010a00000000 0000000000000000
    0000000000000000
    [ 822.340033] 0000000000000004 ffffffff8148749b ffffffff8187e0c0
    000000000000001c
    [ 822.340033] Call Trace:
    [ 822.340033] [] ? mpls_rt_alloc+0x2b/0x3e
    [ 822.340033] [] ? mpls_rtm_newroute+0x358/0x3e2
    [ 822.340033] [] ? get_page+0x5/0xa
    [ 822.340033] [] ? rtnetlink_rcv_msg+0x17e/0x191
    [ 822.340033] [] ? __kmalloc_track_caller+0x8c/0x9e
    [ 822.340033] [] ?
    rht_key_hashfn.isra.20.constprop.57+0x14/0x1f
    [ 822.340033] [] ? __rtnl_unlock+0xc/0xc
    [ 822.340033] [] ? netlink_rcv_skb+0x36/0x82
    [ 822.340033] [] ? rtnetlink_rcv+0x1f/0x28
    [ 822.340033] [] ? netlink_unicast+0x106/0x189
    [ 822.340033] [] ? netlink_sendmsg+0x27f/0x2c8
    [ 822.340033] [] ? sock_sendmsg_nosec+0x10/0x1b
    [ 822.340033] [] ? ___sys_sendmsg+0x182/0x1e3
    [ 822.340033] [] ?
    __alloc_pages_nodemask+0x11c/0x1e4
    [ 822.340033] [] ? PageAnon+0x5/0xd
    [ 822.340033] [] ? __page_set_anon_rmap+0x45/0x52
    [ 822.340033] [] ? get_page+0x5/0xa
    [ 822.340033] [] ? __lru_cache_add+0x1a/0x3a
    [ 822.340033] [] ? current_kernel_time64+0x9/0x30
    [ 822.340033] [] ? __sys_sendmsg+0x3c/0x5a
    [ 822.340033] [] ?
    entry_SYSCALL_64_fastpath+0x12/0x6a
    [ 822.340033] Code: 83 08 04 00 00 65 ff 00 48 8b 3c 24 e8 40 7c f2 ff
    eb 13 48 c7 c3 9f ff ff ff eb 0f 89 ce e8 f1 ae f1 ff 48 89 c3 48 85 db
    74 15 8b 83 08 04 00 00 65 ff 08 48 81 fb 00 f0 ff ff 76 0d eb 07
    [ 822.340033] RIP [] mpls_nh_assign_dev+0x10b/0x182
    [ 822.340033] RSP
    [ 822.340033] CR2: 00000000000003a3
    [ 822.435363] ---[ end trace 98cc65e6f6b8bf11 ]---

    After patch:
    $ip -f mpls route add 100 as 200 via inet 10.1.1.8
    RTNETLINK answers: Network is unreachable

    Signed-off-by: Roopa Prabhu
    Reported-by: David Miller
    Signed-off-by: David S. Miller

    Roopa Prabhu
     

22 Feb, 2016

1 commit


18 Dec, 2015

1 commit


12 Dec, 2015

5 commits

  • The via address is optional for a single path route, yet is mandatory
    when the multipath attribute is used:

    # ip -f mpls route add 100 dev lo
    # ip -f mpls route add 101 nexthop dev lo
    RTNETLINK answers: Invalid argument

    Make them consistent by making the via address optional when the
    RTA_MULTIPATH attribute is being parsed so that both forms of
    specifying the route work.

    Signed-off-by: Robert Shearman
    Signed-off-by: David S. Miller

    Robert Shearman
     
  • When a via address isn't specified, the via table is left initialised
    to 0 (NEIGH_ARP_TABLE), and the via address length also left
    initialised to 0. This results in a via address array of length 0
    being allocated (contiguous with route and nexthop array), meaning
    that when a packet is sent using neigh_xmit the neighbour lookup and
    creation will cause an out-of-bounds access when accessing the 4 bytes
    of the IPv4 address it assumes it has been given a pointer to.

    This could be fixed by allocating the 4 bytes of via address necessary
    and leaving it as all zeroes. However, it seems wrong to me to use an
    ipv4 nexthop (including possibly ARPing for 0.0.0.0) when the user
    didn't specify to do so.

    Instead, set the via address table to NEIGH_NR_TABLES to signify it
    hasn't been specified and use this at forwarding time to signify a
    neigh_xmit using an L2 address consisting of the device address. This
    mechanism is the same as that used for both ARP and ND for loopback
    interfaces and those flagged as no-arp, which are all we can really
    support in this case.

    Fixes: cf4b24f0024f ("mpls: reduce memory usage of routes")
    Signed-off-by: Robert Shearman
    Signed-off-by: David S. Miller

    Robert Shearman
     
  • The problem seen is that when adding a route with a nexthop with no
    via address specified, iproute2 generates bogus output:

    # ip -f mpls route add 100 dev lo
    # ip -f mpls route list
    100 via inet 0.0.8.0 dev lo

    The reason for this is that the kernel generates an RTA_VIA attribute
    with the family set to AF_INET, but the via address data having zero
    length. The cause of family being AF_INET is that on route insert
    cfg->rc_via_table is left set to 0, which just happens to be
    NEIGH_ARP_TABLE which is then translated into AF_INET.

    iproute2 doesn't validate the length prior to printing and so prints
    garbage. Although it could be fixed to do the validation, I would
    argue that AF_INET addresses should always be exactly 4 bytes so the
    kernel is really giving userspace bogus data.

    Therefore, avoid generating the RTA_VIA attribute when dumping the
    route if the via address wasn't specified on add/modify. This is
    indicated by NEIGH_ARP_TABLE and a zero via address length - if the
    user specified a via address the address length would have been
    validated such that it was 4 bytes. Although this is a change in
    behaviour that is visible to userspace, I believe that what was
    generated before was invalid and as such userspace wouldn't be
    expecting it.

    Signed-off-by: Robert Shearman
    Signed-off-by: David S. Miller

    Robert Shearman
     
  • If an L2 via address for an mpls nexthop is specified, the length of
    the L2 address must match that expected by the output device,
    otherwise it could access memory beyond the end of the via address
    buffer in the route.

    This check was present prior to commit f8efb73c97e2 ("mpls: multipath
    route support"), but got lost in the refactoring, so add it back,
    applying it to all nexthops in multipath routes.

    Fixes: f8efb73c97e2 ("mpls: multipath route support")
    Signed-off-by: Robert Shearman
    Acked-by: Roopa Prabhu
    Signed-off-by: David S. Miller

    Robert Shearman
     
  • This gets rid of the following compile warn:
    net/mpls/mpls_iptunnel.c:40:5: warning: no previous prototype for
    mpls_output [-Wmissing-prototypes]

    Signed-off-by: Roopa Prabhu
    Acked-by: Robert Shearman
    Signed-off-by: David S. Miller

    Roopa Prabhu
     

08 Dec, 2015

1 commit

  • Locally generated IPv4 and (probably) IPv6 packets are dropped because
    skb->protocol isn't set. We could write wrappers to lwtunnel_output
    for IPv4 and IPv6 that set the protocol accordingly and then call
    lwtunnel_output, but mpls_output relies on the AF-specific type of dst
    anyway to get the via address.

    Therefore, make use of dst->dst_ops->family in mpls_output to
    determine the type of nexthop and thus protocol of the packet instead
    of checking skb->protocol.

    Fixes: 61adedf3e3f1 ("route: move lwtunnel state to dst_entry")
    Reported-by: Sam Russell
    Signed-off-by: Robert Shearman
    Signed-off-by: David S. Miller

    Robert Shearman
     

04 Dec, 2015

1 commit

  • Adds support for RTNH_F_DEAD and RTNH_F_LINKDOWN flags on mpls
    routes due to link events. Also adds code to ignore dead
    routes during route selection.

    Unlike ip routes, mpls routes are not deleted when the route goes
    dead. This is current mpls behaviour and this patch does not change
    that. With this patch however, routes will be marked dead.
    dead routes are not notified to userspace (this is consistent with ipv4
    routes).

    dead routes:
    -----------
    $ip -f mpls route show
    100
    nexthop as to 200 via inet 10.1.1.2 dev swp1
    nexthop as to 700 via inet 10.1.1.6 dev swp2

    $ip link set dev swp1 down

    $ip link show dev swp1
    4: swp1: mtu 1500 qdisc pfifo_fast state DOWN mode
    DEFAULT group default qlen 1000
    link/ether 00:02:00:00:00:01 brd ff:ff:ff:ff:ff:ff

    $ip -f mpls route show
    100
    nexthop as to 200 via inet 10.1.1.2 dev swp1 dead linkdown
    nexthop as to 700 via inet 10.1.1.6 dev swp2

    linkdown routes:
    ----------------
    $ip -f mpls route show
    100
    nexthop as to 200 via inet 10.1.1.2 dev swp1
    nexthop as to 700 via inet 10.1.1.6 dev swp2

    $ip link show dev swp1
    4: swp1: mtu 1500 qdisc pfifo_fast
    state UP mode DEFAULT group default qlen 1000
    link/ether 00:02:00:00:00:01 brd ff:ff:ff:ff:ff:ff

    /* carrier goes down */
    $ip link show dev swp1
    4: swp1: mtu 1500 qdisc pfifo_fast
    state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:02:00:00:00:01 brd ff:ff:ff:ff:ff:ff

    $ip -f mpls route show
    100
    nexthop as to 200 via inet 10.1.1.2 dev swp1 linkdown
    nexthop as to 700 via inet 10.1.1.6 dev swp2

    Signed-off-by: Roopa Prabhu
    Acked-by: Robert Shearman
    Signed-off-by: David S. Miller

    Roopa Prabhu
     

28 Oct, 2015

2 commits

  • Nexthops for MPLS routes have a via address field sized for the
    largest via address that is expected, which is 32 bytes. This means
    that in the most common case of having ipv4 via addresses, 28 bytes of
    memory more than required are used per nexthop. In the other common
    case of an ipv6 nexthop then 16 bytes more than required are
    used. With large numbers of MPLS routes this extra memory usage could
    start to become significant.

    To avoid allocating memory for a maximum length via address when not
    all of it is required and to allow for ease of iterating over
    nexthops, then the via addresses are changed to be stored in the same
    memory block as the route and nexthops, but in an array after the end
    of the array of nexthops. New accessors are provided to retrieve a
    pointer to the via address.

    To allow for O(1) access without having to store a pointer or offset
    per nh, the via address for each nexthop is sized according to the
    maximum via address for any nexthop in the route, which is stored in a
    new route field, rt_max_alen, but this is in an existing hole in
    struct mpls_route so it doesn't increase the size of the
    structure. Each via address is ensured to be aligned to VIA_ALEN_ALIGN
    to account for architectures that don't allow unaligned accesses.

    Signed-off-by: Robert Shearman
    Signed-off-by: David S. Miller

    Robert Shearman
     
  • Fill in the via address length for the predefined IPv4 and IPv6
    explicit-null label routes.

    Fixes: f8efb73c97e2 ("mpls: multipath route support")
    Signed-off-by: Robert Shearman
    Acked-by: Roopa Prabhu
    Signed-off-by: David S. Miller

    Robert Shearman
     

23 Oct, 2015

2 commits

  • Change the selection of a multipath route to use a flow-based
    hash. This more suitable for traffic sensitive to reordering within a
    flow (e.g. TCP, L2VPN) and whilst still allowing a good distribution
    of traffic given enough flows.

    Selection of the path for a multipath route is done using a hash of:
    1. Label stack up to MAX_MP_SELECT_LABELS labels or up to and
    including entropy label, whichever is first.
    2. 3-tuple of (L3 src, L3 dst, proto) from IPv4/IPv6 header in MPLS
    payload, if present.

    Naturally, a 5-tuple hash using L4 information in addition would be
    possible and be better in some scenarios, but there is a tradeoff
    between looking deeper into the packet to achieve good distribution,
    and packet forwarding performance, and I have erred on the side of the
    latter as the default.

    Signed-off-by: Robert Shearman
    Signed-off-by: Roopa Prabhu
    Signed-off-by: David S. Miller

    Robert Shearman
     
  • This patch adds support for MPLS multipath routes.

    Includes following changes to support multipath:
    - splits struct mpls_route into 'struct mpls_route + struct mpls_nh'

    - 'struct mpls_nh' represents a mpls nexthop label forwarding entry

    - moves mpls route and nexthop structures into internal.h

    - A mpls_route can point to multiple mpls_nh structs

    - the nexthops are maintained as a array (similar to ipv4 fib)

    - In the process of restructuring, this patch also consistently changes
    all labels to u8

    - Adds support to parse/fill RTA_MULTIPATH netlink attribute for
    multipath routes similar to ipv4/v6 fib

    - In this patch, the multipath route nexthop selection algorithm
    simply returns the first nexthop. It is replaced by a
    hash based algorithm from Robert Shearman in the next patch

    - mpls_route_update cleanup: remove 'dev' handling in mpls_route_update.
    mpls_route_update though implemented to update based on dev, it was
    never used that way. And the dev handling gets tricky with multiple
    nexthops. Cannot match against any single nexthops dev. So, this patch
    removes the unused 'dev' handling in mpls_route_update.

    - dead route/path handling will be implemented in a subsequent patch

    Example:

    $ip -f mpls route add 100 nexthop as 200 via inet 10.1.1.2 dev swp1 \
    nexthop as 700 via inet 10.1.1.6 dev swp2 \
    nexthop as 800 via inet 40.1.1.2 dev swp3

    $ip -f mpls route show
    100
    nexthop as to 200 via inet 10.1.1.2 dev swp1
    nexthop as to 700 via inet 10.1.1.6 dev swp2
    nexthop as to 800 via inet 40.1.1.2 dev swp3

    Signed-off-by: Roopa Prabhu
    Acked-by: Robert Shearman
    Signed-off-by: David S. Miller

    Roopa Prabhu
     

08 Oct, 2015

1 commit


01 Sep, 2015

1 commit

  • Fix a memory leak in the mpls netns init function in case of failure. If
    register_net_sysctl fails then we need to free the ctl_table.

    Fixes: 7720c01f3f59 ("mpls: Add a sysctl to control the size of the mpls label table")
    Signed-off-by: Nikolay Aleksandrov
    Signed-off-by: David S. Miller

    Nikolay Aleksandrov
     

25 Aug, 2015

1 commit

  • Add cfg and family arguments to lwt build state functions. cfg is a void
    pointer and will either be a pointer to a fib_config or fib6_config
    structure. The family parameter indicates which one (either AF_INET
    or AF_INET6).

    LWT encpasulation implementation may use the fib configuration to build
    the LWT state.

    Signed-off-by: Tom Herbert
    Signed-off-by: David S. Miller

    Tom Herbert
     

21 Aug, 2015

1 commit

  • Currently, the lwtunnel state resides in per-protocol data. This is
    a problem if we encapsulate ipv6 traffic in an ipv4 tunnel (or vice versa).
    The xmit function of the tunnel does not know whether the packet has been
    routed to it by ipv4 or ipv6, yet it needs the lwtstate data. Moving the
    lwtstate data to dst_entry makes such inter-protocol tunneling possible.

    As a bonus, this brings a nice diffstat.

    Signed-off-by: Jiri Benc
    Acked-by: Roopa Prabhu
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Jiri Benc
     

10 Aug, 2015

1 commit

  • RFC 4182 s2 states that if an IPv4 Explicit NULL label is the only
    label on the stack, then after popping the resulting packet must be
    treated as a IPv4 packet and forwarded based on the IPv4 header. The
    same is true for IPv6 Explicit NULL with an IPv6 packet following.

    Therefore, when installing the IPv4/IPv6 Explicit NULL label routes,
    add an attribute that specifies the expected payload type for use at
    forwarding time for determining the type of the encapsulated packet
    instead of inspecting the first nibble of the packet.

    Signed-off-by: Robert Shearman
    Signed-off-by: David S. Miller

    Robert Shearman
     

07 Aug, 2015

2 commits

  • This patch adds null dev check for the 'cfg->rc_via_table ==
    NEIGH_LINK_TABLE or dev_get_by_index() failed' case

    Reported-by: Dan Carpenter
    Signed-off-by: Roopa Prabhu
    Signed-off-by: David S. Miller

    Roopa Prabhu
     
  • We recently changed this code from returning NULL to returning ERR_PTR.
    There are some left over NULL assignments which we can remove. We can
    preserve the error code from ip_route_output() instead of always
    returning -ENODEV. Also these functions use a mix of gotos and direct
    returns. There is no cleanup necessary so I changed the gotos to
    direct returns.

    Signed-off-by: Dan Carpenter
    Acked-by: Roopa Prabhu
    Acked-by: Robert Shearman
    Signed-off-by: David S. Miller

    Dan Carpenter
     

04 Aug, 2015

1 commit

  • In multiple locations there are checks for whether the label in hand
    is a reserved label or not using the arbritray value of 16. Factor
    this out into a #define for better maintainability and for
    documentation.

    Signed-off-by: Robert Shearman
    Acked-by: Roopa Prabhu
    Signed-off-by: David S. Miller

    Robert Shearman
     

01 Aug, 2015

1 commit

  • Undefined reference to ip6_route_output and ip_route_output
    was reported with CONFIG_INET=n and CONFIG_IPV6=n.

    This patch uses ipv6_stub_impl.ipv6_dst_lookup instead of
    ip6_route_output. And wraps affected code under
    IS_ENABLED(CONFIG_INET) and IS_ENABLED(CONFIG_IPV6).

    Reported-by: kbuild test robot
    Reported-by: Thomas Graf
    Signed-off-by: Roopa Prabhu
    Signed-off-by: David S. Miller

    Roopa Prabhu
     

23 Jul, 2015

1 commit


22 Jul, 2015

3 commits


14 Jun, 2015

1 commit