1. 29 1月, 2008 3 次提交
    • P
      [XFRM]: RFC4303 compliant auditing · afeb14b4
      Paul Moore 提交于
      This patch adds a number of new IPsec audit events to meet the auditing
      requirements of RFC4303.  This includes audit hooks for the following events:
      
       * Could not find a valid SA [sections 2.1, 3.4.2]
         . xfrm_audit_state_notfound()
         . xfrm_audit_state_notfound_simple()
      
       * Sequence number overflow [section 3.3.3]
         . xfrm_audit_state_replay_overflow()
      
       * Replayed packet [section 3.4.3]
         . xfrm_audit_state_replay()
      
       * Integrity check failure [sections 3.4.4.1, 3.4.4.2]
         . xfrm_audit_state_icvfail()
      
      While RFC4304 deals only with ESP most of the changes in this patch apply to
      IPsec in general, i.e. both AH and ESP.  The one case, integrity check
      failure, where ESP specific code had to be modified the same was done to the
      AH code for the sake of consistency.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Acked-by: NJames Morris <jmorris@namei.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      afeb14b4
    • H
      [IPSEC]: Move state lock into x->type->input · 0ebea8ef
      Herbert Xu 提交于
      This patch releases the lock on the state before calling
      x->type->input.  It also adds the lock to the spots where they're
      currently needed.
      
      Most of those places (all except mip6) are expected to disappear with
      async crypto.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ebea8ef
    • H
      [IPSEC]: Move integrity stat collection into xfrm_input · 668dc8af
      Herbert Xu 提交于
      Similar to the moving out of the replay processing on the output, this
      patch moves the integrity stat collectin from x->type->input into
      xfrm_input.
      
      This would eventually allow transforms such as AH/ESP to be lockless.
      
      The error value EBADMSG (currently unused in the crypto layer) is used
      to indicate a failed integrity check.  In future this error can be
      directly returned by the crypto layer once we switch to aead
      algorithms.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      668dc8af
  2. 11 12月, 2007 1 次提交
  3. 31 10月, 2007 1 次提交
    • D
      [NET]: Fix incorrect sg_mark_end() calls. · 51c739d1
      David S. Miller 提交于
      This fixes scatterlist corruptions added by
      
      	commit 68e3f5dd
      	[CRYPTO] users: Fix up scatterlist conversion errors
      
      The issue is that the code calls sg_mark_end() which clobbers the
      sg_page() pointer of the final scatterlist entry.
      
      The first part fo the fix makes skb_to_sgvec() do __sg_mark_end().
      
      After considering all skb_to_sgvec() call sites the most correct
      solution is to call __sg_mark_end() in skb_to_sgvec() since that is
      what all of the callers would end up doing anyways.
      
      I suspect this might have fixed some problems in virtio_net which is
      the sole non-crypto user of skb_to_sgvec().
      
      Other similar sg_mark_end() cases were converted over to
      __sg_mark_end() as well.
      
      Arguably sg_mark_end() is a poorly named function because it doesn't
      just "mark", it clears out the page pointer as a side effect, which is
      what led to these bugs in the first place.
      
      The one remaining plain sg_mark_end() call is in scsi_alloc_sgtable()
      and arguably it could be converted to __sg_mark_end() if only so that
      we can delete this confusing interface from linux/scatterlist.h
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      51c739d1
  4. 27 10月, 2007 2 次提交
  5. 26 10月, 2007 1 次提交
  6. 22 10月, 2007 1 次提交
  7. 18 10月, 2007 1 次提交
  8. 11 10月, 2007 7 次提交
  9. 11 7月, 2007 1 次提交
  10. 26 4月, 2007 9 次提交
  11. 11 2月, 2007 1 次提交
  12. 03 12月, 2006 1 次提交
  13. 23 9月, 2006 3 次提交
  14. 21 9月, 2006 2 次提交
  15. 01 7月, 2006 1 次提交
  16. 18 6月, 2006 1 次提交
    • H
      [IPSEC] proto: Move transport mode input path into xfrm_mode_transport · 31a4ab93
      Herbert Xu 提交于
      Now that we have xfrm_mode objects we can move the transport mode specific
      input decapsulation code into xfrm_mode_transport.  This removes duplicate
      code as well as unnecessary header movement in case of tunnel mode SAs
      since we will discard the original IP header immediately.
      
      This also fixes a minor bug for transport-mode ESP where the IP payload
      length is set to the correct value minus the header length (with extension
      headers for IPv6).
      
      Of course the other neat thing is that we no longer have to allocate
      temporary buffers to hold the IP headers for ESP and IPComp.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31a4ab93
  17. 01 4月, 2006 1 次提交
    • H
      [IPSEC]: Kill unused decap state argument · e695633e
      Herbert Xu 提交于
      This patch removes the decap_state argument from the xfrm input hook.
      Previously this function allowed the input hook to share state with
      the post_input hook.  The latter has since been removed.
      
      The only purpose for it now is to check the encap type.  However, it
      is easier and better to move the encap type check to the generic
      xfrm_rcv function.  This allows us to get rid of the decap state
      argument altogether.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e695633e
  18. 21 3月, 2006 2 次提交
  19. 14 1月, 2006 1 次提交
    • J
      [NET]: Use NIP6_FMT in kernel.h · 46b86a2d
      Joe Perches 提交于
      There are errors and inconsistency in the display of NIP6 strings.
      	ie: net/ipv6/ip6_flowlabel.c
      
      There are errors and inconsistency in the display of NIPQUAD strings too.
      	ie: net/netfilter/nf_conntrack_ftp.c
      
      This patch:
      	adds NIP6_FMT to kernel.h
      	changes all code to use NIP6_FMT
      	fixes net/ipv6/ip6_flowlabel.c
      	adds NIPQUAD_FMT to kernel.h
      	fixes net/netfilter/nf_conntrack_ftp.c
      	changes a few uses of "%u.%u.%u.%u" to NIPQUAD_FMT for symmetry to NIP6_FMT
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46b86a2d