1. 29 1月, 2008 4 次提交
    • P
      [NETNS][FRAGS]: Move ctl tables around. · 8d8354d2
      Pavel Emelyanov 提交于
      This is a preparation for sysctl netns-ization.
      Move the ctl tables to the files, where the tuning
      variables reside. Plus make the helpers to register
      the tables.
      
      This will simplify the later patches and will keep
      similar things closer to each other.
      
      ipv4, ipv6 and conntrack_reasm are patched differently,
      but the result is all the tables are in appropriate files.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d8354d2
    • D
      [IPV6]: Fix ip6_frag ctl · 7d460db9
      Daniel Lezcano 提交于
      Alexey Dobriyan reported an oops when unsharing the network
      indefinitely inside a loop. This is because the ip6_frag is not per
      namespace while the ctls are.
      
      That happens at the fragment timer expiration:
      inet_frag_secret_rebuild function is called and this one restarts the
      timer using the value stored inside the sysctl field.
      
              "mod_timer(&f->secret_timer, now + f->ctl->secret_interval);"
      
      When the network is unshared, ip6_frag.ctl is initialized with the new
      sysctl instances, but ip6_frag has only one instance. A race in this
      case will appear because f->ctl can be modified during the read access
      in the timer callback.
      
      Until the ip6_frag is not per namespace, I discard the assignation to
      the ctl field of ip6_frags in ip6_frag_sysctl_init when the network
      namespace is not the init net.
      Signed-off-by: NDaniel Lezcano <dlezcano@fr.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d460db9
    • D
      [NETNS][IPV6]: Make ip6_frags per namespace. · e71e0349
      Daniel Lezcano 提交于
      The ip6_frags is moved to the network namespace structure.  Because
      there can be multiple instances of the network namespaces, and the
      ip6_frags is no longer a global static variable, a helper function has
      been added to facilitate the initialization of the variables.
      
      Until the ipv6 protocol is not per namespace, the variables are
      accessed relatively from the initial network namespace.
      Signed-off-by: NDaniel Lezcano <dlezcano@fr.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e71e0349
    • D
      [IPV6]: make frag to return an error at initialization · 853cbbaa
      Daniel Lezcano 提交于
      This patch makes the frag_init to return an error code, so the af_inet6
      module can handle the error.
      Signed-off-by: NDaniel Lezcano <dlezcano@fr.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      853cbbaa
  2. 18 10月, 2007 7 次提交
  3. 16 10月, 2007 11 次提交
  4. 11 10月, 2007 1 次提交
    • 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
  5. 26 4月, 2007 8 次提交
  6. 11 2月, 2007 1 次提交
  7. 03 12月, 2006 2 次提交
  8. 23 9月, 2006 2 次提交
  9. 01 7月, 2006 1 次提交
  10. 12 4月, 2006 1 次提交
  11. 21 3月, 2006 1 次提交
  12. 08 1月, 2006 1 次提交