1. 18 10月, 2007 1 次提交
  2. 14 10月, 2007 1 次提交
    • R
      net core: fix kernel-doc for new function parameters · c4ea43c5
      Randy Dunlap 提交于
      Fix networking code kernel-doc for newly added parameters.
      
      Warning(linux-2.6.23-git2//net/core/sock.c:879): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:570): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:594): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:617): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:641): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:667): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:722): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:959): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:1195): No description found for parameter 'dev'
      Warning(linux-2.6.23-git2//net/core/dev.c:2105): No description found for parameter 'n'
      Warning(linux-2.6.23-git2//net/core/dev.c:3272): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//net/core/dev.c:3445): No description found for parameter 'net'
      Warning(linux-2.6.23-git2//include/linux/netdevice.h:1301): No description found for parameter 'cpu'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c4ea43c5
  3. 11 10月, 2007 4 次提交
    • E
      [NET]: Make the device list and device lookups per namespace. · 881d966b
      Eric W. Biederman 提交于
      This patch makes most of the generic device layer network
      namespace safe.  This patch makes dev_base_head a
      network namespace variable, and then it picks up
      a few associated variables.  The functions:
      dev_getbyhwaddr
      dev_getfirsthwbytype
      dev_get_by_flags
      dev_get_by_name
      __dev_get_by_name
      dev_get_by_index
      __dev_get_by_index
      dev_ioctl
      dev_ethtool
      dev_load
      wireless_process_ioctl
      
      were modified to take a network namespace argument, and
      deal with it.
      
      vlan_ioctl_set and brioctl_set were modified so their
      hooks will receive a network namespace argument.
      
      So basically anthing in the core of the network stack that was
      affected to by the change of dev_base was modified to handle
      multiple network namespaces.  The rest of the network stack was
      simply modified to explicitly use &init_net the initial network
      namespace.  This can be fixed when those components of the network
      stack are modified to handle multiple network namespaces.
      
      For now the ifindex generator is left global.
      
      Fundametally ifindex numbers are per namespace, or else
      we will have corner case problems with migration when
      we get that far.
      
      At the same time there are assumptions in the network stack
      that the ifindex of a network device won't change.  Making
      the ifindex number global seems a good compromise until
      the network stack can cope with ifindex changes when
      you change namespaces, and the like.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      881d966b
    • E
      [NET]: Make socket creation namespace safe. · 1b8d7ae4
      Eric W. Biederman 提交于
      This patch passes in the namespace a new socket should be created in
      and has the socket code do the appropriate reference counting.  By
      virtue of this all socket create methods are touched.  In addition
      the socket create methods are modified so that they will fail if
      you attempt to create a socket in a non-default network namespace.
      
      Failing if we attempt to create a socket outside of the default
      network namespace ensures that as we incrementally make the network stack
      network namespace aware we will not export functionality that someone
      has not audited and made certain is network namespace safe.
      Allowing us to partially enable network namespaces before all of the
      exotic protocols are supported.
      
      Any protocol layers I have missed will fail to compile because I now
      pass an extra parameter into the socket creation code.
      
      [ Integrated AF_IUCV build fixes from Andrew Morton... -DaveM ]
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b8d7ae4
    • E
      [NET]: Make /proc/net per network namespace · 457c4cbc
      Eric W. Biederman 提交于
      This patch makes /proc/net per network namespace.  It modifies the global
      variables proc_net and proc_net_stat to be per network namespace.
      The proc_net file helpers are modified to take a network namespace argument,
      and all of their callers are fixed to pass &init_net for that argument.
      This ensures that all of the /proc/net files are only visible and
      usable in the initial network namespace until the code behind them
      has been updated to be handle multiple network namespaces.
      
      Making /proc/net per namespace is necessary as at least some files
      in /proc/net depend upon the set of network devices which is per
      network namespace, and even more files in /proc/net have contents
      that are relevant to a single network namespace.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      457c4cbc
    • J
      [NET]: Change type of owner in sock_lock_t to int, rename · d2e9117c
      John Heffner 提交于
      The type of owner in sock_lock_t is currently (struct sock_iocb *),
      presumably for historical reasons.  It is never used as this type, only
      tested as NULL or set to (void *)1.  For clarity, this changes it to type
      int, and renames to owned, to avoid any possible type casting errors.
      Signed-off-by: NJohn Heffner <jheffner@psc.edu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d2e9117c
  4. 15 9月, 2007 1 次提交
    • D
      [NET]: Fix two issues wrt. SO_BINDTODEVICE. · 4878809f
      David S. Miller 提交于
      1) Comments suggest that setting optlen to zero will unbind
         the socket from whatever device it might be attached to.  This
         hasn't been the case since at least 2.2.x because the first thing
         this function does is return -EINVAL if 'optlen' is less than
         sizeof(int).
      
         This check also means that passing in a two byte string doesn't
         work so well.  It's almost as if this code was testing with "eth?"
         patterned strings and nothing else :-)
      
         Fix this by breaking the logic of this facility out into a
         seperate function which validates optlen more appropriately.
      
         The optlen==0 and small string cases now work properly.
      
      2) We should reset the cached route of the socket after we have made
         the device binding changes, not before.
      
      Reported by Ben Greear.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4878809f
  5. 22 7月, 2007 1 次提交
  6. 20 7月, 2007 2 次提交
  7. 19 7月, 2007 1 次提交
  8. 11 7月, 2007 2 次提交
  9. 04 6月, 2007 1 次提交
    • H
      [NET] gso: Fix GSO feature mask in sk_setup_caps · 4fcd6b99
      Herbert Xu 提交于
      This isn't a bug just yet as only TCP uses sk_setup_caps for GSO.
      However, if and when UDP or something else starts using it this is
      likely to cause a problem if we forget to add software emulation
      for it at the same time.
      
      The problem is that right now we translate GSO emulation to the
      bitmask NETIF_F_GSO_MASK, which includes every protocol, even
      ones that we cannot emulate.
      
      This patch makes it provide only the ones that we can emulate.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4fcd6b99
  10. 25 5月, 2007 1 次提交
    • V
      [NET]: "wrong timeout value" in sk_wait_data() v2 · ba78073e
      Vasily Averin 提交于
      sys_setsockopt() do not check properly timeout values for
      SO_RCVTIMEO/SO_SNDTIMEO, for example it's possible to set negative timeout
      values. POSIX do not defines behaviour for sys_setsockopt in case negative
      timeouts, but requires that setsockopt() shall fail with -EDOM if the send and
      receive timeout values are too big to fit into the timeout fields in the socket
      structure.
      In current implementation negative timeout can lead to error messages like
      "schedule_timeout: wrong timeout value".
      
      Proposed patch:
      - checks tv_usec and returns -EDOM if it is wrong
      - do not allows to set negative timeout values (sets 0 instead) and outputs
      ratelimited information message about such attempts.
      Signed-off-By: NVasily Averin <vvs@sw.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba78073e
  11. 27 4月, 2007 1 次提交
  12. 26 4月, 2007 7 次提交
  13. 23 3月, 2007 1 次提交
  14. 07 3月, 2007 1 次提交
  15. 13 2月, 2007 1 次提交
  16. 11 2月, 2007 1 次提交
  17. 08 12月, 2006 2 次提交
  18. 04 12月, 2006 1 次提交
  19. 03 12月, 2006 2 次提交
  20. 06 11月, 2006 1 次提交
  21. 11 10月, 2006 1 次提交
  22. 23 9月, 2006 3 次提交
  23. 04 7月, 2006 2 次提交
  24. 01 7月, 2006 1 次提交