1. 18 12月, 2019 1 次提交
  2. 21 11月, 2019 1 次提交
  3. 07 2月, 2019 1 次提交
  4. 19 6月, 2016 1 次提交
  5. 16 6月, 2016 1 次提交
    • E
      gre: fix error handler · e582615a
      Eric Dumazet 提交于
      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 b7f8fe25 ("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: NEric Dumazet <edumazet@google.com>
      Cc: Tom Herbert <tom@herbertland.com>
      Cc: Maciej Żenczykowski <maze@google.com>
      Cc: Jiri Benc <jbenc@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e582615a
  6. 13 5月, 2016 1 次提交
  7. 05 5月, 2016 2 次提交
    • J
      gre: remove superfluous pskb_may_pull · 00b20340
      Jiri Benc 提交于
      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: NJiri Benc <jbenc@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      00b20340
    • J
      gre: change gre_parse_header to return the header length · f132ae7c
      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 b7f8fe25
      ("gre: do not pull header in ICMP error processing") for details.
      
      This patch reduces the conflict between the mentioned commit and commit
      95f5c64c ("gre: Move utility functions to common headers").
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Acked-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f132ae7c
  8. 03 5月, 2016 1 次提交
    • T
      gre: Move utility functions to common headers · 95f5c64c
      Tom Herbert 提交于
      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: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95f5c64c
  9. 11 8月, 2015 2 次提交
  10. 09 9月, 2014 1 次提交
  11. 02 9月, 2014 1 次提交
  12. 30 8月, 2014 1 次提交
    • T
      net: Clarification of CHECKSUM_UNNECESSARY · 77cffe23
      Tom Herbert 提交于
      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: NTom Herbert <therbert@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      77cffe23
  13. 25 8月, 2014 1 次提交
  14. 12 7月, 2014 1 次提交
  15. 05 6月, 2014 1 次提交
  16. 09 5月, 2014 1 次提交
  17. 27 3月, 2014 1 次提交
  18. 07 1月, 2014 1 次提交
  19. 20 10月, 2013 1 次提交
  20. 04 7月, 2013 1 次提交
  21. 26 6月, 2013 1 次提交
  22. 20 6月, 2013 5 次提交
  23. 09 5月, 2013 1 次提交
  24. 04 5月, 2013 1 次提交
  25. 27 3月, 2013 1 次提交
    • P
      GRE: Refactor GRE tunneling code. · c5441932
      Pravin B Shelar 提交于
      Following patch refactors GRE code into ip tunneling code and GRE
      specific code. Common tunneling code is moved to ip_tunnel module.
      ip_tunnel module is written as generic library which can be used
      by different tunneling implementations.
      
      ip_tunnel module contains following components:
       - packet xmit and rcv generic code. xmit flow looks like
         (gre_xmit/ipip_xmit)->ip_tunnel_xmit->ip_local_out.
       - hash table of all devices.
       - lookup for tunnel devices.
       - control plane operations like device create, destroy, ioctl, netlink
         operations code.
       - registration for tunneling modules, like gre, ipip etc.
       - define single pcpu_tstats dev->tstats.
       - struct tnl_ptk_info added to pass parsed tunnel packet parameters.
      
      ipip.h header is renamed to ip_tunnel.h
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5441932
  26. 26 3月, 2013 1 次提交
  27. 22 3月, 2013 1 次提交
  28. 16 2月, 2013 1 次提交
    • P
      v4 GRE: Add TCP segmentation offload for GRE · 68c33163
      Pravin B Shelar 提交于
      Following patch adds GRE protocol offload handler so that
      skb_gso_segment() can segment GRE packets.
      SKB GSO CB is added to keep track of total header length so that
      skb_segment can push entire header. e.g. in case of GRE, skb_segment
      need to push inner and outer headers to every segment.
      New NETIF_F_GRE_GSO feature is added for devices which support HW
      GRE TSO offload. Currently none of devices support it therefore GRE GSO
      always fall backs to software GSO.
      
      [ Compute pkt_len before ip_local_out() invocation. -DaveM ]
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      68c33163
  29. 13 3月, 2012 1 次提交
  30. 02 8月, 2011 1 次提交
  31. 24 7月, 2011 1 次提交
  32. 22 6月, 2011 1 次提交
    • J
      Remove redundant linux/version.h includes from net/ · dec17b74
      Jesper Juhl 提交于
      It was suggested by "make versioncheck" that the follwing includes of
      linux/version.h are redundant:
      
        /home/jj/src/linux-2.6/net/caif/caif_dev.c: 14 linux/version.h not needed.
        /home/jj/src/linux-2.6/net/caif/chnl_net.c: 10 linux/version.h not needed.
        /home/jj/src/linux-2.6/net/ipv4/gre.c: 19 linux/version.h not needed.
        /home/jj/src/linux-2.6/net/netfilter/ipset/ip_set_core.c: 20 linux/version.h not needed.
        /home/jj/src/linux-2.6/net/netfilter/xt_set.c: 16 linux/version.h not needed.
      
      and it seems that it is right.
      
      Beyond manually inspecting the source files I also did a few build
      tests with various configs to confirm that including the header in
      those files is indeed not needed.
      
      Here's a patch to remove the pointless includes.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Acked-by: NJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dec17b74
  33. 26 10月, 2010 1 次提交
  34. 04 10月, 2010 1 次提交