1. 11 10月, 2007 4 次提交
    • E
      [IPV4]: Remove unnecessary test for the loopback device from inetdev_destroy · 5967789d
      Eric W. Biederman 提交于
      Currently we never call unregister_netdev for the loopback device so
      it is impossible for us to reach inetdev_destroy with the loopback
      device.  So the test in inetdev_destroy is unnecessary.
      
      Further when testing with my network namespace patches removing
      unregistering the loopback device and calling inetdev_destroy works
      fine so there appears to be no reason for avoiding unregistering the
      loopback device.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5967789d
    • D
      [NET]: Dynamically allocate the loopback device, part 1. · de3cb747
      Daniel Lezcano 提交于
      This patch replaces all occurences to the static variable
      loopback_dev to a pointer loopback_dev. That provides the
      mindless, trivial, uninteressting change part for the dynamic
      allocation for the loopback.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDaniel Lezcano <dlezcano@fr.ibm.com>
      Acked-By: NKirill Korotaev <dev@sw.ru>
      Acked-by: NBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de3cb747
    • 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 device event notification network namespace safe · e9dc8653
      Eric W. Biederman 提交于
      Every user of the network device notifiers is either a protocol
      stack or a pseudo device.  If a protocol stack that does not have
      support for multiple network namespaces receives an event for a
      device that is not in the initial network namespace it quite possibly
      can get confused and do the wrong thing.
      
      To avoid problems until all of the protocol stacks are converted
      this patch modifies all netdev event handlers to ignore events on
      devices that are not in the initial network namespace.
      
      As the rest of the code is made network namespace aware these
      checks can be removed.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9dc8653
  2. 11 9月, 2007 1 次提交
  3. 31 7月, 2007 1 次提交
  4. 09 6月, 2007 1 次提交
  5. 08 6月, 2007 5 次提交
  6. 04 5月, 2007 1 次提交
  7. 26 4月, 2007 3 次提交
  8. 10 3月, 2007 1 次提交
  9. 27 2月, 2007 1 次提交
  10. 15 2月, 2007 3 次提交
  11. 11 2月, 2007 1 次提交
  12. 09 2月, 2007 1 次提交
    • P
      [NETLINK]: Don't BUG on undersized allocations · 26932566
      Patrick McHardy 提交于
      Currently netlink users BUG when the allocated skb for an event
      notification is undersized. While this is certainly a kernel bug,
      its not critical and crashing the kernel is too drastic, especially
      when considering that these errors have appeared multiple times in
      the past and it BUGs even if no listeners are present.
      
      This patch replaces BUG by WARN_ON and changes the notification
      functions to inform potential listeners of undersized allocations
      using a unique error code (EMSGSIZE).
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      26932566
  13. 10 1月, 2007 1 次提交
  14. 05 1月, 2007 1 次提交
  15. 11 12月, 2006 1 次提交
  16. 03 12月, 2006 3 次提交
  17. 29 9月, 2006 5 次提交
  18. 23 9月, 2006 6 次提交