1. 11 10月, 2007 3 次提交
    • 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 packet reception network namespace safe · e730c155
      Eric W. Biederman 提交于
      This patch modifies every packet receive function
      registered with dev_add_pack() to drop packets if they
      are not from the initial network namespace.
      
      This should ensure that the various network stacks do
      not receive packets in a anything but the initial network
      namespace until the code has been converted and is ready
      for them.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e730c155
    • 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
  2. 14 8月, 2007 1 次提交
    • J
      [IPCONFIG]: ip_auto_config fix · dcbdc93c
      Joakim Tjernlund 提交于
      The following commandline:
      
       root=/dev/mtdblock6 rw rootfstype=jffs2 ip=192.168.1.10:::255.255.255.0:localhost.localdomain:eth1:off console=ttyS0,115200
      
      makes ip_auto_config fall back to DHCP and complain "IP-Config: Incomplete
      network configuration information." depending on if CONFIG_IP_PNP_DHCP is
      set or not.
      
      The only way I can make ip_auto_config accept my IP config is to add an
      entry for the server IP:
      
      ip=192.168.1.10:192.168.1.15::255.255.255.0:localhost.localdomain:eth1:off
      
      I think this is a bug since I am not using a NFS root FS.
      
      The following patch fixes the above problem.
      
      From: Andrew Morton <akpm@linux-foundation.org>
      
      Davem said (in February!):
      
        Well, first of all the change in question is not in 2.4.x either.  I just
        checked the current 2.4.x GIT tree and the test is exactly:
      
      	if (ic_myaddr == INADDR_NONE ||
      #ifdef CONFIG_ROOT_NFS
      	    (MAJOR(ROOT_DEV) == UNNAMED_MAJOR
      	     && root_server_addr == INADDR_NONE
      	     && ic_servaddr == INADDR_NONE) ||
      #endif
      	    ic_first_dev->next) {
      
        which matches 2.6.x
      
        I even checked 2.4.x when it was branched for 2.5.x and the test was the
        same at the point in time too.
      
        Looking at the proposed change a bit it appears that it is probably
        correct, as it's trying to check that ROOT_DEV is nfs root.  But if it is
        correct then the UNNAMED_MAJOR comparison in the same code block should be
        removed as it becomes superfluous.
      
        I'm happy to apply this patch with that modification made.
      Signed-off-by: NJoakim Tjernlund <joakim.tjernlund@transmode.se>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dcbdc93c
  3. 04 5月, 2007 1 次提交
  4. 26 4月, 2007 5 次提交
  5. 13 2月, 2007 1 次提交
  6. 11 2月, 2007 1 次提交
  7. 03 12月, 2006 1 次提交
  8. 25 10月, 2006 1 次提交
  9. 02 10月, 2006 2 次提交
  10. 23 9月, 2006 1 次提交
  11. 21 3月, 2006 1 次提交
  12. 04 1月, 2006 1 次提交
  13. 13 9月, 2005 1 次提交
  14. 06 9月, 2005 1 次提交
  15. 30 8月, 2005 1 次提交
    • D
      [NET]: Kill skb->real_dev · f2ccd8fa
      David S. Miller 提交于
      Bonding just wants the device before the skb_bond()
      decapsulation occurs, so simply pass that original
      device into packet_type->func() as an argument.
      
      It remains to be seen whether we can use this same
      exact thing to get rid of skb->input_dev as well.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f2ccd8fa
  16. 29 6月, 2005 1 次提交
    • M
      [IPV4]: ipconfig.c: fix dhcp timeout behaviour · 7a1af5d7
      Maxime Bizon 提交于
      I think there is a small bug in ipconfig.c in case IPCONFIG_DHCP is set
      and dhcp is used.
      
      When a DHCPOFFER is received, ip address is kept until we get DHCPACK.
      If no ack is received, ic_dynamic() returns negatively, but leaves the
      offered ip address in ic_myaddr.
      
      This makes the main loop in ip_auto_config() break and uses the maybe
      incomplete configuration.
      
      Not sure if it's the best way to do, but the following trivial patch
      correct this. 
      Signed-off-by: NMaxime Bizon <mbizon@freebox.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a1af5d7
  17. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4