02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

08 Aug, 2017

1 commit

  • This patch implements a new type of lightweight tunnel named seg6local.
    A seg6local lwt is defined by a type of action and a set of parameters.
    The action represents the operation to perform on the packets matching the
    lwt's route, and is not necessarily an encapsulation. The set of parameters
    are arguments for the processing function.

    Each action is defined in a struct seg6_action_desc within
    seg6_action_table[]. This structure contains the action, mandatory
    attributes, the processing function, and a static headroom size required by
    the action. The mandatory attributes are encoded as a bitmask field. The
    static headroom is set to a non-zero value when the processing function
    always add a constant number of bytes to the skb (e.g. the header size for
    encapsulations).

    To facilitate rtnetlink-related operations such as parsing, fill_encap,
    and cmp_encap, each type of action parameter is associated to three
    function pointers, in seg6_action_params[].

    All actions defined in seg6_local.h are detailed in [1].

    [1] https://tools.ietf.org/html/draft-filsfils-spring-srv6-network-programming-01

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

    David Lebrun
     

04 Aug, 2017

1 commit

  • We're about to add IPv6 FIB offload support, so implement the necessary
    callbacks in IPv6 code, which will later allow us to add routes and
    rules notifications.

    Signed-off-by: Ido Schimmel
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Ido Schimmel
     

15 Feb, 2017

1 commit

  • This patch adds GRO ifrastructure and callbacks for ESP on
    ipv4 and ipv6.

    In case the GRO layer detects an ESP packet, the
    esp{4,6}_gro_receive() function does a xfrm state lookup
    and calls the xfrm input layer if it finds a matching state.
    The packet will be decapsulated and reinjected it into layer 2.

    Signed-off-by: Steffen Klassert

    Steffen Klassert
     

17 Nov, 2016

1 commit

  • This patch adds a new option CONFIG_IPV6_SEG6_LWTUNNEL to enable/disable
    support of encapsulation with the lightweight tunnels. When this option
    is enabled, CONFIG_LWTUNNEL is automatically selected.

    Fix commit 6c8702c60b88 ("ipv6: sr: add support for SRH encapsulation and injection with lwtunnels")

    Without a proper option to control lwtunnel support for SR-IPv6, if
    CONFIG_LWTUNNEL=n then the IPv6 initialization fails as a consequence
    of seg6_iptunnel_init() failure with EOPNOTSUPP:

    NET: Registered protocol family 10
    IPv6: Attempt to unregister permanent protocol 6
    IPv6: Attempt to unregister permanent protocol 136
    IPv6: Attempt to unregister permanent protocol 17
    NET: Unregistered protocol family 10

    Tested (compiling, booting, and loading ipv6 module when relevant)
    with possible combinations of CONFIG_IPV6={y,m,n},
    CONFIG_IPV6_SEG6_LWTUNNEL={y,n} and CONFIG_LWTUNNEL={y,n}.

    Reported-by: Lorenzo Colitti
    Suggested-by: Roopa Prabhu
    Signed-off-by: David Lebrun
    Signed-off-by: David S. Miller

    David Lebrun
     

10 Nov, 2016

3 commits

  • This patch adds the necessary functions to compute and check the HMAC signature
    of an SR-enabled packet. Two HMAC algorithms are supported: hmac(sha1) and
    hmac(sha256).

    In order to avoid dynamic memory allocation for each HMAC computation,
    a per-cpu ring buffer is allocated for this purpose.

    A new per-interface sysctl called seg6_require_hmac is added, allowing a
    user-defined policy for processing HMAC-signed SR-enabled packets.
    A value of -1 means that the HMAC field will always be ignored.
    A value of 0 means that if an HMAC field is present, its validity will
    be enforced (the packet is dropped is the signature is incorrect).
    Finally, a value of 1 means that any SR-enabled packet that does not
    contain an HMAC signature or whose signature is incorrect will be dropped.

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

    David Lebrun
     
  • This patch creates a new type of interfaceless lightweight tunnel (SEG6),
    enabling the encapsulation and injection of SRH within locally emitted
    packets and forwarded packets.

    >From a configuration viewpoint, a seg6 tunnel would be configured as follows:

    ip -6 ro ad fc00::1/128 encap seg6 mode encap segs fc42::1,fc42::2,fc42::3 dev eth0

    Any packet whose destination address is fc00::1 would thus be encapsulated
    within an outer IPv6 header containing the SRH with three segments, and would
    actually be routed to the first segment of the list. If `mode inline' was
    specified instead of `mode encap', then the SRH would be directly inserted
    after the IPv6 header without outer encapsulation.

    The inline mode is only available if CONFIG_IPV6_SEG6_INLINE is enabled. This
    feature was made configurable because direct header insertion may break
    several mechanisms such as PMTUD or IPSec AH.

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

    David Lebrun
     
  • This patch adds the necessary hooks and structures to provide support
    for SR-IPv6 control plane, essentially the Generic Netlink commands
    that will be used for userspace control over the Segment Routing
    kernel structures.

    The genetlink commands provide control over two different structures:
    tunnel source and HMAC data. The tunnel source is the source address
    that will be used by default when encapsulating packets into an
    outer IPv6 header + SRH. If the tunnel source is set to :: then an
    address of the outgoing interface will be selected as the source.

    The HMAC commands currently just return ENOTSUPP and will be implemented
    in a future patch.

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

    David Lebrun
     

07 Jul, 2016

1 commit


28 Jun, 2016

1 commit

  • CALIPSO is a packet labelling protocol for IPv6 which is very similar
    to CIPSO. It is specified in RFC 5570. Much of the code is based on
    the current CIPSO code.

    This adds support for adding passthrough-type CALIPSO DOIs through the
    NLBL_CALIPSO_C_ADD command. It requires attributes:

    NLBL_CALIPSO_A_TYPE which must be CALIPSO_MAP_PASS.
    NLBL_CALIPSO_A_DOI.

    In passthrough mode the CALIPSO engine will map MLS secattr levels
    and categories directly to the packet label.

    At this stage, the major difference between this and the CIPSO
    code is that IPv6 may be compiled as a module. To allow for
    this the CALIPSO functions are registered at module init time.

    Signed-off-by: Huw Davies
    Signed-off-by: Paul Moore

    Huw Davies
     

01 Jun, 2016

1 commit

  • The Kconfig options I added to work around broken compilation ended
    up screwing up things more, as I used the wrong symbol to control
    compilation of the file, resulting in IPv6 fou support to never be built
    into the kernel.

    Changing CONFIG_NET_FOU_IPV6_TUNNELS to CONFIG_IPV6_FOU fixes that
    problem, I had renamed the symbol in one location but not the other,
    and as the file is never being used by other kernel code, this did not
    lead to a build failure that I would have caught.

    After that fix, another issue with the same patch becomes obvious, as we
    'select INET6_TUNNEL', which is related to IPV6_TUNNEL, but not the same,
    and this can still cause the original build failure when IPV6_TUNNEL is
    not built-in but IPV6_FOU is. The fix is equally trivial, we just need
    to select the right symbol.

    I have successfully build 350 randconfig kernels with this patch
    and verified that the driver is now being built.

    Signed-off-by: Arnd Bergmann
    Reported-by: Valentin Rothberg
    Fixes: fabb13db448e ("fou: add Kconfig options for IPv6 support")
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

30 May, 2016

1 commit

  • A previous patch added the fou6.ko module, but that failed to link
    in a couple of configurations:

    net/built-in.o: In function `ip6_tnl_encap_add_fou_ops':
    net/ipv6/fou6.c:88: undefined reference to `ip6_tnl_encap_add_ops'
    net/ipv6/fou6.c:94: undefined reference to `ip6_tnl_encap_add_ops'
    net/ipv6/fou6.c:97: undefined reference to `ip6_tnl_encap_del_ops'
    net/built-in.o: In function `ip6_tnl_encap_del_fou_ops':
    net/ipv6/fou6.c:106: undefined reference to `ip6_tnl_encap_del_ops'
    net/ipv6/fou6.c:107: undefined reference to `ip6_tnl_encap_del_ops'

    If CONFIG_IPV6=m, ip6_tnl_encap_add_ops/ip6_tnl_encap_del_ops
    are in a module, but fou6.c can still be built-in, and that
    obviously fails to link.

    Also, if CONFIG_IPV6=y, but CONFIG_IPV6_TUNNEL=m or
    CONFIG_IPV6_TUNNEL=n, the same problem happens for a different
    reason.

    This adds two new silent Kconfig symbols to work around both
    problems:

    - CONFIG_IPV6_FOU is now always set to 'm' if either CONFIG_NET_FOU=m
    or CONFIG_IPV6=m
    - CONFIG_IPV6_FOU_TUNNEL is set implicitly when IPV6_FOU is enabled
    and NET_FOU_IP_TUNNELS is also turned out, and it will ensure
    that CONFIG_IPV6_TUNNEL is also available.

    The options could be made user-visible as well, to give additional
    room for configuration, but it seems easier not to bother users
    with more choice here.

    Signed-off-by: Arnd Bergmann
    Fixes: aa3463d65e7b ("fou: Add encap ops for IPv6 tunnels")
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

21 May, 2016

1 commit


08 Apr, 2016

1 commit

  • This patch adds GRO functions (gro_receive and gro_complete) to UDP
    sockets. udp_gro_receive is changed to perform socket lookup on a
    packet. If a socket is found the related GRO functions are called.

    This features obsoletes using UDP offload infrastructure for GRO
    (udp_offload). This has the advantage of not being limited to provide
    offload on a per port basis, GRO is now applied to whatever individual
    UDP sockets are bound to. This also allows the possbility of
    "application defined GRO"-- that is we can attach something like
    a BPF program to a UDP socket to perfrom GRO on an application
    layer protocol.

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

    Tom Herbert
     

16 Dec, 2015

1 commit

  • Create ila directory in preparation for supporting other hooks in the
    kernel than LWT for doing ILA. This includes:
    - Moving ila.c to ila/ila_lwt.c
    - Splitting out some common functions into ila_common.c

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

    Tom Herbert
     

18 Aug, 2015

1 commit

  • Adding new module name ila. This implements ILA translation. Light
    weight tunnel redirection is used to perform the translation in
    the data path. This is configured by the "ip -6 route" command
    using the "encap ila " option, where is the
    value to set in destination locator of the packet. e.g.

    ip -6 route add 3333:0:0:1:5555:0:1:0/128 \
    encap ila 2001:0:0:1 via 2401:db00:20:911a:face:0:25:0

    Sets a route where 3333:0:0:1 will be overwritten by
    2001:0:0:1 on output.

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

    Tom Herbert
     

05 May, 2015

1 commit

  • With this patch, the IGMP and MLD message validation functions are moved
    from the bridge code to IPv4/IPv6 multicast files. Some small
    refactoring was done to enhance readibility and to iron out some
    differences in behaviour between the IGMP and MLD parsing code (e.g. the
    skb-cloning of MLD messages is now only done if necessary, just like the
    IGMP part always did).

    Finally, these IGMP and MLD message validation functions are exported so
    that not only the bridge can use it but batman-adv later, too.

    Signed-off-by: Linus Lüssing
    Signed-off-by: David S. Miller

    Linus Lüssing
     

20 Sep, 2014

2 commits

  • Functions supplied in ip6_udp_tunnel.c are only needed when IPV6 is
    selected. When IPV6 is not selected, those functions are stubbed out
    in udp_tunnel.h.

    ==================================================================
    net/ipv6/ip6_udp_tunnel.c:15:5: error: redefinition of 'udp_sock_create6'
    int udp_sock_create6(struct net *net, struct udp_port_cfg *cfg,
    In file included from net/ipv6/ip6_udp_tunnel.c:9:0:
    include/net/udp_tunnel.h:36:19: note: previous definition of 'udp_sock_create6' was here
    static inline int udp_sock_create6(struct net *net, struct udp_port_cfg *cfg,
    ==================================================================

    Fixes: fd384412e udp_tunnel: Seperate ipv6 functions into its own file
    Reported-by: kbuild test robot
    Signed-off-by: Andy Zhou
    Signed-off-by: David S. Miller

    Andy Zhou
     
  • Add ip6_udp_tunnel.c for ipv6 UDP tunnel functions to avoid ifdefs
    in udp_tunnel.c

    Signed-off-by: Andy Zhou
    Signed-off-by: David S. Miller

    Andy Zhou
     

14 Mar, 2014

1 commit


10 Oct, 2013

1 commit


26 May, 2013

1 commit

  • This adds the ability to send ICMPv6 echo requests without a
    raw socket. The equivalent ability for ICMPv4 was added in
    2011.

    Instead of having separate code paths for IPv4 and IPv6, make
    most of the code in net/ipv4/ping.c dual-stack and only add a
    few IPv6-specific bits (like the protocol definition) to a new
    net/ipv6/ping.c. Hopefully this will reduce divergence and/or
    duplication of bugs in the future.

    Caveats:

    - Setting options via ancillary data (e.g., using IPV6_PKTINFO
    to specify the outgoing interface) is not yet supported.
    - There are no separate security settings for IPv4 and IPv6;
    everything is controlled by /proc/net/ipv4/ping_group_range.
    - The proc interface does not yet display IPv6 ping sockets
    properly.

    Tested with a patched copy of ping6 and using raw socket calls.
    Compiles and works with all of CONFIG_IPV6={n,m,y}.

    Signed-off-by: Lorenzo Colitti
    Signed-off-by: David S. Miller

    Lorenzo Colitti
     

30 Apr, 2013

1 commit

  • Following patch adds icmp-registration module for ipv6. It allows
    ipv6 protocol to register icmp_sender which is used for sending
    ipv6 icmp msgs. This extra layer allows us to kill ipv6 dependency
    for sending icmp packets.

    This patch also fixes ip_tunnel compilation problem when ip_tunnel
    is statically compiled in kernel but ipv6 is module

    Signed-off-by: Pravin B Shelar
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

09 Jan, 2013

1 commit


17 Dec, 2012

1 commit

  • The following commit breaks IPv6 TCP transmission for me:
    Commit 75fe83c32248d99e6d5fe64155e519b78bb90481
    Author: Vlad Yasevich
    Date: Fri Nov 16 09:41:21 2012 +0000
    ipv6: Preserve ipv6 functionality needed by NET

    This patch fixes the typo "ipv6_offload" which should be
    "ipv6-offload".

    I don't know why not including the offload modules should
    break TCP. Disabling all offload options on the NIC didn't
    help. Outgoing pulseaudio traffic kept stalling.

    Signed-off-by: Simon Arlott
    Signed-off-by: David S. Miller

    Simon Arlott
     

18 Nov, 2012

1 commit


16 Nov, 2012

6 commits


15 Aug, 2012

1 commit


05 Apr, 2008

1 commit


07 Mar, 2008

1 commit

  • This reverts commit db1ed684f6c430c4cdad67d058688b8a1b5e607c ("[IPV6]
    UDP: Rename IPv6 UDP files."), commit
    8be8af8fa4405652e6c0797db5465a4be8afb998 ("[IPV4] UDP: Move
    IPv4-specific bits to other file.") and commit
    e898d4db2749c6052072e9bc4448e396cbdeb06a ("[UDP]: Allow users to
    configure UDP-Lite.").

    First, udplite is of such small cost, and it is a core protocol just
    like TCP and normal UDP are.

    We spent enormous amounts of effort to make udplite share as much code
    with core UDP as possible. All of that work is less valuable if we're
    just going to slap a config option on udplite support.

    It is also causing build failures, as reported on linux-next, showing
    that the changeset was not tested very well. In fact, this is the
    second build failure resulting from the udplite change.

    Finally, the config options provided was a bool, instead of a modular
    option. Meaning the udplite code does not even get build tested
    by allmodconfig builds, and furthermore the user is not presented
    with a reasonable modular build option which is particularly needed
    by distribution vendors.

    Signed-off-by: David S. Miller

    David S. Miller
     

04 Mar, 2008

3 commits


29 Jan, 2008

2 commits