1. 25 8月, 2014 1 次提交
    • I
      ipv6: White-space cleansing : Line Layouts · 67ba4152
      Ian Morris 提交于
      This patch makes no changes to the logic of the code but simply addresses
      coding style issues as detected by checkpatch.
      
      Both objdump and diff -w show no differences.
      
      A number of items are addressed in this patch:
      * Multiple spaces converted to tabs
      * Spaces before tabs removed.
      * Spaces in pointer typing cleansed (char *)foo etc.
      * Remove space after sizeof
      * Ensure spacing around comparators such as if statements.
      Signed-off-by: NIan Morris <ipm@chirality.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67ba4152
  2. 14 8月, 2013 1 次提交
    • H
      xfrm: make local error reporting more robust · 628e341f
      Hannes Frederic Sowa 提交于
      In xfrm4 and xfrm6 we need to take care about sockets of the other
      address family. This could happen because a 6in4 or 4in6 tunnel could
      get protected by ipsec.
      
      Because we don't want to have a run-time dependency on ipv6 when only
      using ipv4 xfrm we have to embed a pointer to the correct local_error
      function in xfrm_state_afinet and look it up when returning an error
      depending on the socket address family.
      
      Thanks to vi0ss for the great bug report:
      <https://bugzilla.kernel.org/show_bug.cgi?id=58691>
      
      v2:
      a) fix two more unsafe interpretations of skb->sk as ipv6 socket
         (xfrm6_local_dontfrag and __xfrm6_output)
      v3:
      a) add an EXPORT_SYMBOL_GPL(xfrm_local_error) to fix a link error when
         building ipv6 as a module (thanks to Steffen Klassert)
      
      Reported-by: <vi0oss@gmail.com>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      628e341f
  3. 02 11月, 2012 1 次提交
  4. 23 11月, 2011 1 次提交
  5. 01 11月, 2011 1 次提交
  6. 11 5月, 2011 1 次提交
    • S
      xfrm: Assign the inner mode output function to the dst entry · 43a4dea4
      Steffen Klassert 提交于
      As it is, we assign the outer modes output function to the dst entry
      when we create the xfrm bundle. This leads to two problems on interfamily
      scenarios. We might insert ipv4 packets into ip6_fragment when called
      from xfrm6_output. The system crashes if we try to fragment an ipv4
      packet with ip6_fragment. This issue was introduced with git commit
      ad0081e4 (ipv6: Fragment locally generated tunnel-mode IPSec6 packets
      as needed). The second issue is, that we might insert ipv4 packets in
      netfilter6 and vice versa on interfamily scenarios.
      
      With this patch we assign the inner mode output function to the dst entry
      when we create the xfrm bundle. So xfrm4_output/xfrm6_output from the inner
      mode is used and the right fragmentation and netfilter functions are called.
      We switch then to outer mode with the output_finish functions.
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43a4dea4
  7. 13 3月, 2011 4 次提交
  8. 24 2月, 2011 1 次提交
  9. 23 2月, 2011 1 次提交
  10. 21 9月, 2010 1 次提交
    • T
      xfrm: Allow different selector family in temporary state · 8444cf71
      Thomas Egerer 提交于
      The family parameter xfrm_state_find is used to find a state matching a
      certain policy. This value is set to the template's family
      (encap_family) right before xfrm_state_find is called.
      The family parameter is however also used to construct a temporary state
      in xfrm_state_find itself which is wrong for inter-family scenarios
      because it produces a selector for the wrong family. Since this selector
      is included in the xfrm_user_acquire structure, user space programs
      misinterpret IPv6 addresses as IPv4 and vice versa.
      This patch splits up the original init_tempsel function into a part that
      initializes the selector respectively the props and id of the temporary
      state, to allow for differing ip address families whithin the state.
      Signed-off-by: NThomas Egerer <thomas.egerer@secunet.com>
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8444cf71
  11. 22 2月, 2009 1 次提交
  12. 25 11月, 2008 1 次提交
  13. 05 11月, 2008 1 次提交
  14. 27 3月, 2008 1 次提交
    • H
      [IPSEC]: Fix BEET output · 732c8bd5
      Herbert Xu 提交于
      The IPv6 BEET output function is incorrectly including the inner
      header in the payload to be protected.  This causes a crash as
      the packet doesn't actually have that many bytes for a second
      header.
      
      The IPv4 BEET output on the other hand is broken when it comes
      to handling an inner IPv6 header since it always assumes an
      inner IPv4 header.
      
      This patch fixes both by making sure that neither BEET output
      function touches the inner header at all.  All access is now
      done through the protocol-independent cb structure.  Two new
      attributes are added to make this work, the IP header length
      and the IPv4 option length.  They're filled in by the inner
      mode's output function.
      
      Thanks to Joakim Koskela for finding this problem.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      732c8bd5
  15. 25 3月, 2008 1 次提交
  16. 29 1月, 2008 8 次提交
  17. 18 10月, 2007 2 次提交
    • H
      [IPSEC]: Store afinfo pointer in xfrm_mode · 17c2a42a
      Herbert Xu 提交于
      It is convenient to have a pointer from xfrm_state to address-specific
      functions such as the output function for a family.  Currently the
      address-specific policy code calls out to the xfrm state code to get
      those pointers when we could get it in an easier way via the state
      itself.
      
      This patch adds an xfrm_state_afinfo to xfrm_mode (since they're
      address-specific) and changes the policy code to use it.  I've also
      added an owner field to do reference counting on the module providing
      the afinfo even though it isn't strictly necessary today since IPv6
      can't be unloaded yet.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      17c2a42a
    • H
      [IPSEC]: Add missing BEET checks · 1bfcb10f
      Herbert Xu 提交于
      Currently BEET mode does not reinject the packet back into the stack
      like tunnel mode does.  Since BEET should behave just like tunnel mode
      this is incorrect.
      
      This patch fixes this by introducing a flags field to xfrm_mode that
      tells the IPsec code whether it should terminate and reinject the packet
      back into the stack.
      
      It then sets the flag for BEET and tunnel mode.
      
      I've also added a number of missing BEET checks elsewhere where we check
      whether a given mode is a tunnel or not.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1bfcb10f
  18. 11 7月, 2007 1 次提交
    • M
      [IPV6] MIP6: Loadable module support for MIPv6. · 59fbb3a6
      Masahide NAKAMURA 提交于
      This patch makes MIPv6 loadable module named "mip6".
      
      Here is a modprobe.conf(5) example to load it automatically
      when user application uses XFRM state for MIPv6:
      
      alias xfrm-type-10-43 mip6
      alias xfrm-type-10-60 mip6
      
      Some MIPv6 feature is not included by this modular, however,
      it should not be affected to other features like either IPsec
      or IPv6 with and without the patch.
      We may discuss XFRM, MH (RAW socket) and ancillary data/sockopt
      separately for future work.
      
      Loadable features:
      * MH receiving check (to send ICMP error back)
      * RO header parsing and building (i.e. RH2 and HAO in DSTOPTS)
      * XFRM policy/state database handling for RO
      
      These are NOT covered as loadable:
      * Home Address flags and its rule on source address selection
      * XFRM sub policy (depends on its own kernel option)
      * XFRM functions to receive RO as IPv6 extension header
      * MH sending/receiving through raw socket if user application
        opens it (since raw socket allows to do so)
      * RH2 sending as ancillary data
      * RH2 operation with setsockopt(2)
      Signed-off-by: NMasahide NAKAMURA <nakam@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59fbb3a6
  19. 11 2月, 2007 1 次提交
  20. 09 2月, 2007 1 次提交
  21. 29 9月, 2006 1 次提交
  22. 23 9月, 2006 8 次提交