1. 04 1月, 2006 7 次提交
    • H
      [IPV4]: Safer reassembly · 89cee8b1
      Herbert Xu 提交于
      Another spin of Herbert Xu's "safer ip reassembly" patch
      for 2.6.16.
      
      (The original patch is here:
      http://marc.theaimsgroup.com/?l=linux-netdev&m=112281936522415&w=2
      and my only contribution is to have tested it.)
      
      This patch (optionally) does additional checks before accepting IP
      fragments, which can greatly reduce the possibility of reassembling
      fragments which originated from different IP datagrams.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NArthur Kepner <akepner@sgi.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89cee8b1
    • B
      [NETFILTER] ebtables: Support nf_log API from ebt_log and ebt_ulog · d5228a4f
      Bart De Schuymer 提交于
      This makes ebt_log and ebt_ulog use the new nf_log api.  This enables
      the bridging packet filter to log packets e.g. via nfnetlink_log.
      Signed-off-by: NBart De Schuymer <bdschuym@pandora.be>
      Signed-off-by: NHarald Welte <laforge@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d5228a4f
    • E
      [NETFILTER] ip_tables: NUMA-aware allocation · 31836064
      Eric Dumazet 提交于
      Part of a performance problem with ip_tables is that memory allocation
      is not NUMA aware, but 'only' SMP aware (ie each CPU normally touch
      separate cache lines)
      
      Even with small iptables rules, the cost of this misplacement can be
      high on common workloads.  Instead of using one vmalloc() area
      (located in the node of the iptables process), we now allocate an area
      for each possible CPU, using vmalloc_node() so that memory should be
      allocated in the CPU's node if possible.
      
      Port to arp_tables and ip6_tables by Harald Welte.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31836064
    • S
      [TCP] BIC: CUBIC window growth (2.0) · df3271f3
      Stephen Hemminger 提交于
      Replace existing BIC version 1.1 with new version 2.0.
      The main change is to replace the window growth function
      with a cubic function as described in:
        http://www.csc.ncsu.edu/faculty/rhee/export/bitcp/cubic-paper.pdfSigned-off-by: NStephen Hemminger <shemminger@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df3271f3
    • S
      [TCP] BIC: spelling and whitespace · 05d05450
      Stephen Hemminger 提交于
      Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05d05450
    • S
      [TCP] BIC: remove low utilization code. · 018da8f4
      Stephen Hemminger 提交于
      The latest BICTCP patch at:
      http://www.csc.ncsu.edu:8080/faculty/rhee/export/bitcp/index_files/Page546.htm
      
      disables the low_utilization feature of BICTCP because it doesn't work
      in some cases. This patch removes it.
      Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      018da8f4
    • T
      [LSM-IPSec]: Security association restriction. · df71837d
      Trent Jaeger 提交于
      This patch series implements per packet access control via the
      extension of the Linux Security Modules (LSM) interface by hooks in
      the XFRM and pfkey subsystems that leverage IPSec security
      associations to label packets.  Extensions to the SELinux LSM are
      included that leverage the patch for this purpose.
      
      This patch implements the changes necessary to the XFRM subsystem,
      pfkey interface, ipv4/ipv6, and xfrm_user interface to restrict a
      socket to use only authorized security associations (or no security
      association) to send/receive network packets.
      
      Patch purpose:
      
      The patch is designed to enable access control per packets based on
      the strongly authenticated IPSec security association.  Such access
      controls augment the existing ones based on network interface and IP
      address.  The former are very coarse-grained, and the latter can be
      spoofed.  By using IPSec, the system can control access to remote
      hosts based on cryptographic keys generated using the IPSec mechanism.
      This enables access control on a per-machine basis or per-application
      if the remote machine is running the same mechanism and trusted to
      enforce the access control policy.
      
      Patch design approach:
      
      The overall approach is that policy (xfrm_policy) entries set by
      user-level programs (e.g., setkey for ipsec-tools) are extended with a
      security context that is used at policy selection time in the XFRM
      subsystem to restrict the sockets that can send/receive packets via
      security associations (xfrm_states) that are built from those
      policies.
      
      A presentation available at
      www.selinux-symposium.org/2005/presentations/session2/2-3-jaeger.pdf
      from the SELinux symposium describes the overall approach.
      
      Patch implementation details:
      
      On output, the policy retrieved (via xfrm_policy_lookup or
      xfrm_sk_policy_lookup) must be authorized for the security context of
      the socket and the same security context is required for resultant
      security association (retrieved or negotiated via racoon in
      ipsec-tools).  This is enforced in xfrm_state_find.
      
      On input, the policy retrieved must also be authorized for the socket
      (at __xfrm_policy_check), and the security context of the policy must
      also match the security association being used.
      
      The patch has virtually no impact on packets that do not use IPSec.
      The existing Netfilter (outgoing) and LSM rcv_skb hooks are used as
      before.
      
      Also, if IPSec is used without security contexts, the impact is
      minimal.  The LSM must allow such policies to be selected for the
      combination of socket and remote machine, but subsequent IPSec
      processing proceeds as in the original case.
      
      Testing:
      
      The pfkey interface is tested using the ipsec-tools.  ipsec-tools have
      been modified (a separate ipsec-tools patch is available for version
      0.5) that supports assignment of xfrm_policy entries and security
      associations with security contexts via setkey and the negotiation
      using the security contexts via racoon.
      
      The xfrm_user interface is tested via ad hoc programs that set
      security contexts.  These programs are also available from me, and
      contain programs for setting, getting, and deleting policy for testing
      this interface.  Testing of sa functions was done by tracing kernel
      behavior.
      Signed-off-by: NTrent Jaeger <tjaeger@cse.psu.edu>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df71837d
  2. 28 12月, 2005 3 次提交
    • D
      [IPV6] mcast: Fix multiple issues in MLDv2 reports. · 5ab4a6c8
      David L Stevens 提交于
      The below "jumbo" patch fixes the following problems in MLDv2.
      
      1) Add necessary "ntohs" to recent "pskb_may_pull" check [breaks
              all nonzero source queries on little-endian (!)]
      
      2) Add locking to source filter list [resend of prior patch]
      
      3) fix "mld_marksources()" to
              a) send nothing when all queried sources are excluded
              b) send full exclude report when source queried sources are
                      not excluded
              c) don't schedule a timer when there's nothing to report
      
      NOTE: RFC 3810 specifies the source list should be saved and each
        source reported individually as an IS_IN. This is an obvious DOS
        path, requiring the host to store and then multicast as many sources
        as are queried (e.g., millions...). This alternative sends a full, 
        relevant report that's limited to number of sources present on the
        machine.
      
      4) fix "add_grec()" to send empty-source records when it should
              The original check doesn't account for a non-empty source
              list with all sources inactive; the new code keeps that
              short-circuit case, and also generates the group header
              with an empty list if needed.
      
      5) fix mca_crcount decrement to be after add_grec(), which needs
              its original value
      
      These issues (other than item #1 ;-) ) were all found by Yan Zheng,
      much thanks!
      Signed-off-by: NDavid L Stevens <dlstevens@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ab4a6c8
    • D
      [NET]: Validate socket filters against BPF_MAXINSNS in one spot. · 1b93ae64
      David S. Miller 提交于
      Currently the checks are scattered all over and this leads
      to inconsistencies and even cases where the check is not made.
      
      Based upon a patch from Kris Katterjohn.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b93ae64
    • Y
      [IPV6]: Fix addrconf dead lock. · 6732bade
      YOSHIFUJI Hideaki 提交于
      We need to release idev->lcok before we call addrconf_dad_stop().
      It calls ipv6_addr_del(), which will hold idev->lock.
      
      Bug spotted by Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>.
      Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6732bade
  3. 27 12月, 2005 2 次提交
  4. 24 12月, 2005 2 次提交
  5. 22 12月, 2005 5 次提交
    • D
      [IPSEC]: Fix policy updates missed by sockets · 9b78a82c
      David S. Miller 提交于
      The problem is that when new policies are inserted, sockets do not see
      the update (but all new route lookups do).
      
      This bug is related to the SA insertion stale route issue solved
      recently, and this policy visibility problem can be fixed in a similar
      way.
      
      The fix is to flush out the bundles of all policies deeper than the
      policy being inserted.  Consider beginning state of "outgoing"
      direction policy list:
      
      	policy A --> policy B --> policy C --> policy D
      
      First, realize that inserting a policy into a list only potentially
      changes IPSEC routes for that direction.  Therefore we need not bother
      considering the policies for other directions.  We need only consider
      the existing policies in the list we are doing the inserting.
      
      Consider new policy "B'", inserted after B.
      
      	policy A --> policy B --> policy B' --> policy C --> policy D
      
      Two rules:
      
      1) If policy A or policy B matched before the insertion, they
         appear before B' and thus would still match after inserting
         B'
      
      2) Policy C and D, now "shadowed" and after policy B', potentially
         contain stale routes because policy B' might be selected
         instead of them.
      
      Therefore we only need flush routes assosciated with policies
      appearing after a newly inserted policy, if any.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b78a82c
    • I
      [DCCP]: Comment typo · 4c7e6895
      Ian McDonald 提交于
      I hope to actually change this behaviour shortly but this will help
      anybody grepping code at present.
      Signed-off-by: NIan McDonald <imcdnzl@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4c7e6895
    • K
      [IPV6]: Fix address deletion · 1d142804
      Kristian Slavov 提交于
      If you add more than one IPv6 address belonging to the same prefix and 
      delete the address that was last added, routing table entry for that 
      prefix is also deleted.
      Tested on 2.6.14.4
      
      To reproduce:
      ip addr add 3ffe::1/64 dev eth0
      ip addr add 3ffe::2/64 dev eth0
      /* wait DAD */
      sleep 1
      ip addr del 3ffe::2/64 dev eth0
      ip -6 route
      
      (route to 3ffe::/64 should be gone)
      
      In ipv6_del_addr(), if ifa == ifp, we set ifa->if_next to NULL, and later 
      assign ifap = &ifa->if_next, effectively terminating the for-loop.
      This prevents us from checking if there are other addresses using the same 
      prefix that are valid, and thus resulting in deletion of the prefix.
      This applies only if the first entry in idev->addr_list is the address to 
      be deleted.
      Signed-off-by: NKristian Slavov <kristian.slavov@nomadiclab.com>
      Acked-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d142804
    • M
      [VLAN]: Add two missing checks to vlan_ioctl_handler() · 7eb1b3d3
      Mika Kukkonen 提交于
      In vlan_ioctl_handler() the code misses couple checks for
      error return values.
      Signed-off-by: NMika Kukkonen <mikukkon@iki.fi>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7eb1b3d3
    • M
      [NETROM]: Fix three if-statements in nr_state1_machine() · 0d77d59f
      Mika Kukkonen 提交于
      I found these while compiling with extra gcc warnings;
      considering the indenting surely they are not intentional?
      Signed-off-by: NMika Kukkonen <mikukkon@iki.fi>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d77d59f
  6. 21 12月, 2005 5 次提交
  7. 20 12月, 2005 9 次提交
  8. 16 12月, 2005 1 次提交
  9. 15 12月, 2005 2 次提交
  10. 14 12月, 2005 2 次提交
  11. 13 12月, 2005 2 次提交