1. 29 1月, 2008 8 次提交
  2. 09 1月, 2008 1 次提交
  3. 24 10月, 2007 1 次提交
  4. 18 10月, 2007 6 次提交
  5. 16 10月, 2007 1 次提交
  6. 11 10月, 2007 7 次提交
  7. 18 7月, 2007 1 次提交
  8. 11 7月, 2007 4 次提交
  9. 08 6月, 2007 1 次提交
    • J
      xfrm: Add security check before flushing SAD/SPD · 4aa2e62c
      Joy Latten 提交于
      Currently we check for permission before deleting entries from SAD and
      SPD, (see security_xfrm_policy_delete() security_xfrm_state_delete())
      However we are not checking for authorization when flushing the SPD and
      the SAD completely. It was perhaps missed in the original security hooks
      patch.
      
      This patch adds a security check when flushing entries from the SAD and
      SPD.  It runs the entire database and checks each entry for a denial.
      If the process attempting the flush is unable to remove all of the
      entries a denial is logged the the flush function returns an error
      without removing anything.
      
      This is particularly useful when a process may need to create or delete
      its own xfrm entries used for things like labeled networking but that
      same process should not be able to delete other entries or flush the
      entire database.
      
      Signed-off-by: Joy Latten<latten@austin.ibm.com>
      Signed-off-by: NEric Paris <eparis@parisplace.org>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      4aa2e62c
  10. 31 5月, 2007 1 次提交
  11. 05 5月, 2007 2 次提交
  12. 30 4月, 2007 1 次提交
    • M
      [XFRM]: Restrict upper layer information by bundle. · 157bfc25
      Masahide NAKAMURA 提交于
      On MIPv6 usage, XFRM sub policy is enabled.
      When main (IPsec) and sub (MIPv6) policy selectors have the same
      address set but different upper layer information (i.e. protocol
      number and its ports or type/code), multiple bundle should be created.
      However, currently we have issue to use the same bundle created for
      the first time with all flows covered by the case.
      
      It is useful for the bundle to have the upper layer information
      to be restructured correctly if it does not match with the flow.
      
      1. Bundle was created by two policies
      Selector from another policy is added to xfrm_dst.
      If the flow does not match the selector, it goes to slow path to
      restructure new bundle by single policy.
      
      2. Bundle was created by one policy
      Flow cache is added to xfrm_dst as originated one. If the flow does
      not match the cache, it goes to slow path to try searching another
      policy.
      Signed-off-by: NMasahide NAKAMURA <nakam@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      157bfc25
  13. 29 4月, 2007 1 次提交
  14. 26 4月, 2007 2 次提交
    • J
      [XFRM]: Export SAD info. · 28d8909b
      Jamal Hadi Salim 提交于
      On a system with a lot of SAs, counting SAD entries chews useful
      CPU time since you need to dump the whole SAD to user space;
      i.e something like ip xfrm state ls | grep -i src | wc -l
      I have seen taking literally minutes on a 40K SAs when the system
      is swapping.
      With this patch, some of the SAD info (that was already being tracked)
      is exposed to user space. i.e you do:
      ip xfrm state count
      And you get the count; you can also pass -s to the command line and
      get the hash info.
      Signed-off-by: NJamal Hadi Salim <hadi@cyberus.ca>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28d8909b
    • P
      [XFRM]: Optimize MTU calculation · c5c25238
      Patrick McHardy 提交于
      Replace the probing based MTU estimation, which usually takes 2-3 iterations
      to find a fitting value and may underestimate the MTU, by an exact calculation.
      
      Also fix underestimation of the XFRM trailer_len, which causes unnecessary
      reallocations.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5c25238
  15. 08 3月, 2007 1 次提交
    • E
      [IPSEC]: xfrm_policy delete security check misplaced · ef41aaa0
      Eric Paris 提交于
      The security hooks to check permissions to remove an xfrm_policy were
      actually done after the policy was removed.  Since the unlinking and
      deletion are done in xfrm_policy_by* functions this moves the hooks
      inside those 2 functions.  There we have all the information needed to
      do the security check and it can be done before the deletion.  Since
      auditing requires the result of that security check err has to be passed
      back and forth from the xfrm_policy_by* functions.
      
      This patch also fixes a bug where a deletion that failed the security
      check could cause improper accounting on the xfrm_policy
      (xfrm_get_policy didn't have a put on the exit path for the hold taken
      by xfrm_policy_by*)
      
      It also fixes the return code when no policy is found in
      xfrm_add_pol_expire.  In old code (at least back in the 2.6.18 days) err
      wasn't used before the return when no policy is found and so the
      initialization would cause err to be ENOENT.  But since err has since
      been used above when we don't get a policy back from the xfrm_policy_by*
      function we would always return 0 instead of the intended ENOENT.  Also
      fixed some white space damage in the same area.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NVenkat Yekkirala <vyekkirala@trustedcs.com>
      Acked-by: NJames Morris <jmorris@namei.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef41aaa0
  16. 14 2月, 2007 2 次提交