1. 24 1月, 2006 1 次提交
  2. 19 1月, 2006 1 次提交
  3. 18 1月, 2006 2 次提交
  4. 17 1月, 2006 1 次提交
  5. 14 1月, 2006 1 次提交
  6. 12 1月, 2006 3 次提交
  7. 11 1月, 2006 3 次提交
  8. 10 1月, 2006 1 次提交
  9. 07 1月, 2006 3 次提交
  10. 05 1月, 2006 3 次提交
  11. 04 1月, 2006 8 次提交
    • C
      [NET]: Add a dev_ioctl() fallback to sock_ioctl() · b5e5fa5e
      Christoph Hellwig 提交于
      Currently all network protocols need to call dev_ioctl as the default
      fallback in their ioctl implementations.  This patch adds a fallback
      to dev_ioctl to sock_ioctl if the protocol returned -ENOIOCTLCMD.
      This way all the procotol ioctl handlers can be simplified and we don't
      need to export dev_ioctl.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b5e5fa5e
    • B
      [NET]: Speed up __alloc_skb() · 4947d3ef
      Benjamin LaHaise 提交于
      From: Benjamin LaHaise <bcrl@kvack.org>
      
      In __alloc_skb(), the use of skb_shinfo() which casts a u8 * to the 
      shared info structure results in gcc being forced to do a reload of the 
      pointer since it has no information on possible aliasing.  Fix this by 
      using a pointer to refer to skb_shared_info.
      
      By initializing skb_shared_info sequentially, the write combining buffers 
      can reduce the number of memory transactions to a single write.  Reorder 
      the initialization in __alloc_skb() to match the structure definition.  
      There is also an alignment issue on 64 bit systems with skb_shared_info 
      by converting nr_frags to a short everything packs up nicely.
      
      Also, pass the slab cache pointer according to the fclone flag instead 
      of using two almost identical function calls.
      
      This raises bw_unix performance up to a peak of 707KB/s when combined 
      with the spinlock patch.  It should help other networking protocols, too.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4947d3ef
    • A
      [INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.h · 14c85021
      Arnaldo Carvalho de Melo 提交于
      To help in reducing the number of include dependencies, several files were
      touched as they were getting needed headers indirectly for stuff they use.
      
      Thanks also to Alan Menegotto for pointing out that net/dccp/proto.c had
      linux/dccp.h include twice.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14c85021
    • J
      [PKTGEN]: Deinitialise static variables. · f34fbb97
      Jaco Kroon 提交于
      static variables should not be explicitly initialised to 0.  This causes
      them to be placed in .data instead of .bss.  This patch de-initialises 3
      static variables in net/core/pktgen.c.
      
      There are approximately 800 more such variables in the source tree
      (2.6.15rc5).  If there is more interrest I'd be willing to track down the
      rest of these as well and de-initialise them as well.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f34fbb97
    • A
      [TWSK]: Introduce struct timewait_sock_ops · 6d6ee43e
      Arnaldo Carvalho de Melo 提交于
      So that we can share several timewait sockets related functions and
      make the timewait mini sockets infrastructure closer to the request
      mini sockets one.
      
      Next changesets will take advantage of this, moving more code out of
      TCP and DCCP v4 and v6 to common infrastructure.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d6ee43e
    • B
      [NET]: Avoid atomic xchg() for non-error case · c1cbe4b7
      Benjamin LaHaise 提交于
      It also looks like there were 2 places where the test on sk_err was
      missing from the event wait logic (in sk_stream_wait_connect and
      sk_stream_wait_memory), while the rest of the sock_error() users look
      to be doing the right thing.  This version of the patch fixes those,
      and cleans up a few places that were testing ->sk_err directly.
      Signed-off-by: NBenjamin LaHaise <benjamin.c.lahaise@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1cbe4b7
    • H
      [IP]: Simplify and consolidate MSG_PEEK error handling · 3305b80c
      Herbert Xu 提交于
      When a packet is obtained from skb_recv_datagram with MSG_PEEK enabled
      it is left on the socket receive queue.  This means that when we detect
      a checksum error we have to be careful when trying to free the packet
      as someone could have dequeued it in the time being.
      
      Currently this delicate logic is duplicated three times between UDPv4,
      UDPv6 and RAWv6.  This patch moves them into a one place and simplifies
      the code somewhat.
      
      This is based on a suggestion by Eric Dumazet.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3305b80c
    • 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
  12. 28 12月, 2005 1 次提交
  13. 09 12月, 2005 1 次提交
  14. 06 12月, 2005 1 次提交
  15. 21 11月, 2005 1 次提交
  16. 14 11月, 2005 2 次提交
  17. 11 11月, 2005 1 次提交
    • H
      [NET]: Detect hardware rx checksum faults correctly · fb286bb2
      Herbert Xu 提交于
      Here is the patch that introduces the generic skb_checksum_complete
      which also checks for hardware RX checksum faults.  If that happens,
      it'll call netdev_rx_csum_fault which currently prints out a stack
      trace with the device name.  In future it can turn off RX checksum.
      
      I've converted every spot under net/ that does RX checksum checks to
      use skb_checksum_complete or __skb_checksum_complete with the
      exceptions of:
      
      * Those places where checksums are done bit by bit.  These will call
      netdev_rx_csum_fault directly.
      
      * The following have not been completely checked/converted:
      
      ipmr
      ip_vs
      netfilter
      dccp
      
      This patch is based on patches and suggestions from Stephen Hemminger
      and David S. Miller.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb286bb2
  18. 10 11月, 2005 3 次提交
    • T
      9ac4a169
    • T
      [NETLINK]: Make netlink_callback->done() optional · a8f74b22
      Thomas Graf 提交于
      Most netlink families make no use of the done() callback, making
      it optional gets rid of all unnecessary dummy implementations.
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a8f74b22
    • Y
      [NETFILTER]: Add nf_conntrack subsystem. · 9fb9cbb1
      Yasuyuki Kozakai 提交于
      The existing connection tracking subsystem in netfilter can only
      handle ipv4.  There were basically two choices present to add
      connection tracking support for ipv6.  We could either duplicate all
      of the ipv4 connection tracking code into an ipv6 counterpart, or (the
      choice taken by these patches) we could design a generic layer that
      could handle both ipv4 and ipv6 and thus requiring only one sub-protocol
      (TCP, UDP, etc.) connection tracking helper module to be written.
      
      In fact nf_conntrack is capable of working with any layer 3
      protocol.
      
      The existing ipv4 specific conntrack code could also not deal
      with the pecularities of doing connection tracking on ipv6,
      which is also cured here.  For example, these issues include:
      
      1) ICMPv6 handling, which is used for neighbour discovery in
         ipv6 thus some messages such as these should not participate
         in connection tracking since effectively they are like ARP
         messages
      
      2) fragmentation must be handled differently in ipv6, because
         the simplistic "defrag, connection track and NAT, refrag"
         (which the existing ipv4 connection tracking does) approach simply
         isn't feasible in ipv6
      
      3) ipv6 extension header parsing must occur at the correct spots
         before and after connection tracking decisions, and there were
         no provisions for this in the existing connection tracking
         design
      
      4) ipv6 has no need for stateful NAT
      
      The ipv4 specific conntrack layer is kept around, until all of
      the ipv4 specific conntrack helpers are ported over to nf_conntrack
      and it is feature complete.  Once that occurs, the old conntrack
      stuff will get placed into the feature-removal-schedule and we will
      fully kill it off 6 months later.
      Signed-off-by: NYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
      Signed-off-by: NHarald Welte <laforge@netfilter.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      9fb9cbb1
  19. 09 11月, 2005 1 次提交
  20. 06 11月, 2005 1 次提交
    • H
      [NET]: Fix race condition in sk_stream_wait_connect · 6151b31c
      Herbert Xu 提交于
      When sk_stream_wait_connect detects a state transition to ESTABLISHED
      or CLOSE_WAIT prior to it going to sleep, it will return without
      calling finish_wait and decrementing sk_write_pending.
      
      This may result in crashes and other unintended behaviour.
      
      The fix is to always call finish_wait and update sk_write_pending since
      it is safe to do so even if the wait entry is no longer on the queue.
      
      This bug was tracked down with the help of Alex Sidorenko and the
      fix is also based on his suggestion.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      6151b31c
  21. 03 11月, 2005 1 次提交