30 Jun, 2016

1 commit


19 Jun, 2016

1 commit


16 Jun, 2016

1 commit

  • 1) gre_parse_header() can be called from gre_err()

    At this point transport header points to ICMP header, not the inner
    header.

    2) We can not really change transport header as ipgre_err() will later
    assume transport header still points to ICMP header (using icmp_hdr())

    3) pskb_may_pull() logic in gre_parse_header() really works
    if we are interested at zone pointed by skb->data

    4) As Jiri explained in commit b7f8fe251e46 ("gre: do not pull header in
    ICMP error processing") we should not pull headers in error handler.

    So this fix :

    A) changes gre_parse_header() to use skb->data instead of
    skb_transport_header()

    B) Adds a nhs parameter to gre_parse_header() so that we can skip the
    not pulled IP header from error path.
    This offset is 0 for normal receive path.

    C) remove obsolete IPV6 includes

    Signed-off-by: Eric Dumazet
    Cc: Tom Herbert
    Cc: Maciej Żenczykowski
    Cc: Jiri Benc
    Signed-off-by: David S. Miller

    Eric Dumazet
     

13 May, 2016

1 commit


05 May, 2016

2 commits

  • The call to gre_parse_header is either followed by iptunnel_pull_header, or
    in the case of ICMP error path, the actual header is not accessed at all.

    In the first case, iptunnel_pull_header will call pskb_may_pull anyway and
    it's pointless to do it twice. The only difference is what call will fail
    with what error code but the net effect is still the same in all call sites.

    In the second case, pskb_may_pull is pointless, as skb->data is at the outer
    IP header and not at the GRE header.

    Signed-off-by: Jiri Benc
    Signed-off-by: David S. Miller

    Jiri Benc
     
  • It's easier for gre_parse_header to return the header length instead of
    filing it into a parameter. That way, the callers that don't care about the
    header length can just check whether the returned value is lower than zero.

    In gre_err, the tunnel header must not be pulled. See commit b7f8fe251e46
    ("gre: do not pull header in ICMP error processing") for details.

    This patch reduces the conflict between the mentioned commit and commit
    95f5c64c3c13 ("gre: Move utility functions to common headers").

    Signed-off-by: Jiri Benc
    Acked-by: Tom Herbert
    Signed-off-by: David S. Miller

    Jiri Benc
     

03 May, 2016

1 commit

  • Several of the GRE functions defined in net/ipv4/ip_gre.c are usable
    for IPv6 GRE implementation (that is they are protocol agnostic).

    These include:
    - GRE flag handling functions are move to gre.h
    - GRE build_header is moved to gre.h and renamed gre_build_header
    - parse_gre_header is moved to gre_demux.c and renamed gre_parse_header
    - iptunnel_pull_header is taken out of gre_parse_header. This is now
    done by caller. The header length is returned from gre_parse_header
    in an int* argument.

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

    Tom Herbert
     

11 Aug, 2015

2 commits

  • Support for sharing GREPROTO_CISCO port was added so that
    OVS gre port and kernel GRE devices can co-exist. After
    flow-based tunneling patches OVS GRE protocol processing
    is completely moved to ip_gre module. so there is no need
    for GRE protocol hook. Following patch consolidates
    GRE protocol related functions into ip_gre module.

    Signed-off-by: Pravin B Shelar
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Pravin B Shelar
     
  • Using GRE tunnel meta data collection feature, we can implement
    OVS GRE vport. This patch removes all of the OVS
    specific GRE code and make OVS use a ip_gre net_device.
    Minimal GRE vport is kept to handle compatibility with
    current userspace application.

    Signed-off-by: Pravin B Shelar
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

09 Sep, 2014

1 commit

  • GRE assumes that the GRE header is at skb_network_header +
    ip_hrdlen(skb). It is more general to use skb_transport_header
    and this allows the possbility of inserting additional header
    between IP and GRE (which is what we will done in Generic UDP
    Encapsulation for GRE).

    Signed-off-by: Tom Herbert
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Tom Herbert
     

02 Sep, 2014

1 commit


30 Aug, 2014

1 commit

  • This patch:
    - Clarifies the specific requirements of devices returning
    CHECKSUM_UNNECESSARY (comments in skbuff.h).
    - Adds csum_level field to skbuff. This is used to express how
    many checksums are covered by CHECKSUM_UNNECESSARY (stores n - 1).
    This replaces the overloading of skb->encapsulation, that field is
    is now only used to indicate inner headers are valid.
    - Change __skb_checksum_validate_needed to "consume" each checksum
    as indicated by csum_level as layers of the the packet are parsed.
    - Remove skb_pop_rcv_encapsulation, no longer needed in the new
    csum_level model.

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

    Tom Herbert
     

25 Aug, 2014

1 commit


12 Jul, 2014

1 commit

  • To get offloads to work with Generic Routing Encapsulation (GRE), the
    outer transport header has to be reset after skb_push is done. This
    patch has the support for this fix and hence GRE offloading.

    Signed-off-by: Amritha Nambiar
    Signed-off-by: Joseph Gasparakis
    Tested-By: Jim Young
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Amritha Nambiar
     

05 Jun, 2014

1 commit

  • Call gso_make_checksum. This should have the benefit of using a
    checksum that may have been previously computed for the packet.

    This also adds NETIF_F_GSO_GRE_CSUM to differentiate devices that
    offload GRE GSO with and without the GRE checksum offloaed.

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

    Tom Herbert
     

09 May, 2014

1 commit


27 Mar, 2014

1 commit

  • Commit 10ddceb22ba (ip_tunnel:multicast process cause panic due
    to skb->_skb_refdst NULL pointer) removed dst-drop call from
    ip-tunnel-recv.

    Following commit reintroduce dst-drop and fix the original bug by
    checking loopback packet before releasing dst.
    Original bug: https://bugzilla.kernel.org/show_bug.cgi?id=70681

    CC: Xin Long
    Signed-off-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

07 Jan, 2014

1 commit


20 Oct, 2013

1 commit


04 Jul, 2013

1 commit