1. 31 10月, 2008 1 次提交
  2. 21 6月, 2008 1 次提交
  3. 11 6月, 2008 2 次提交
  4. 29 4月, 2008 1 次提交
  5. 26 3月, 2008 1 次提交
  6. 29 1月, 2008 1 次提交
  7. 01 11月, 2007 1 次提交
  8. 11 10月, 2007 8 次提交
    • S
      [NET]: Wrap netdevice hardware header creation. · 0c4e8581
      Stephen Hemminger 提交于
      Add inline for common usage of hardware header creation, and
      fix bug in IPV6 mcast where the assumption about negative return is
      an errno. Negative return from hard_header means not enough space
      was available,(ie -N bytes).
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c4e8581
    • A
      pppoe: endianness · b963dc1d
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b963dc1d
    • J
      [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF() · 0795af57
      Joe Perches 提交于
      This is nicer than the MAC_FMT stuff.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0795af57
    • 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
    • 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 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
  9. 21 9月, 2007 1 次提交
  10. 17 9月, 2007 4 次提交
  11. 01 8月, 2007 1 次提交
  12. 31 7月, 2007 2 次提交
  13. 26 4月, 2007 6 次提交
    • M
      [PPPOE]: Fix device tear-down notification. · 42dc9cd5
      Michal Ostrowski 提交于
      pppoe_flush_dev() kicks all sockets bound to a device that is going down.
      In doing so, locks must be taken in the right order consistently (sock lock,
      followed by the pppoe_hash_lock).  However, the scan process is based on
      us holding the sock lock.  So, when something is found in the scan we must
      release the lock we're holding and grab the sock lock.
      
      This patch fixes race conditions between this code and pppoe_release(),
      both of which perform similar functions but would naturally prefer to grab
      locks in opposing orders.  Both code paths are now going after these locks
      in a consistent manner.
      
      pppoe_hash_lock protects the contents of the "pppox_sock" objects that reside
      inside the hash.  Thus, NULL'ing out the pppoe_dev field should be done
      under the protection of this lock.
      Signed-off-by: NMichal Ostrowski <mostrows@earthlink.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42dc9cd5
    • F
      [PPPOE]: race between interface going down and connect() · 74b885cf
      Florian Zumbiehl 提交于
      below you find a patch that (hopefully) fixes a race between an interface
      going down and a connect() to a peer on that interface. Before,
      connect() would determine that an interface is up, then the interface
      could go down and all entries referring to that interface in the
      item_hash_table would be marked as ZOMBIEs and their references to
      the device would be freed, and after that, connect() would put a new
      entry into the hash table referring to the device that meanwhile is
      down already - which also would cause unregister_netdevice() to wait
      until the socket has been release()d.
      
      This patch does not suffice if we are not allowed to accept connect()s
      referring to a device that we already acked a NETDEV_GOING_DOWN for
      (that is: all references are only guaranteed to be freed after
      NETDEV_DOWN has been acknowledged, not necessarily after the
      NETDEV_GOING_DOWN already). And if we are allowed to, we could avoid
      looking through the hash table upon NETDEV_GOING_DOWN completely and
      only do that once we get the NETDEV_DOWN ...
      
      mostrows:
      pppoe_flush_dev is called on NETDEV_GOING_DOWN and NETDEV_DOWN to deal with
      this "late connect" issue.  Ideally one would hope to notify users at the
      "NETDEV_GOING_DOWN" phase (just to pretend to be nice).  However, it is the
      NETDEV_DOWN scan that takes all the responsibility for ensuring nobody is
      hanging around at that time.
      Signed-off-by: NFlorian Zumbiehl <florz@florz.de>
      Acked-by: NMichal Ostrowski <mostrows@earthlink.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      74b885cf
    • F
      [PPPoE]: miscellaneous smaller cleanups · bfafb26e
      Florian Zumbiehl 提交于
      below is a patch that just removes dead code/initializers without any
      effect (first access is an assignment) that I stumbled accross while
      reading the source.
      Signed-off-by: NFlorian Zumbiehl <florz@florz.de>
      Acked-by: NMichal Ostrowski <mostrows@earthlink.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bfafb26e
    • A
      [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset} · d626f62b
      Arnaldo Carvalho de Melo 提交于
      To clearly state the intent of copying from linear sk_buffs, _offset being a
      overly long variant but interesting for the sake of saving some bytes.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d626f62b
    • A
      [SK_BUFF]: Introduce skb_reset_network_header(skb) · c1d2bbe1
      Arnaldo Carvalho de Melo 提交于
      For the common, open coded 'skb->nh.raw = skb->data' operation, so that we can
      later turn skb->nh.raw into a offset, reducing the size of struct sk_buff in
      64bit land while possibly keeping it as a pointer on 32bit.
      
      This one touches just the most simple case, next will handle the slightly more
      "complex" cases.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1d2bbe1
    • A
      [PPPOE]: Introduce pppoe_hdr() · 797659fb
      Arnaldo Carvalho de Melo 提交于
      For consistency with all the other skb->nh.raw accessors.
      
      Also do some really obvious simplifications in pppoe_recvmsg, well the
      kfree_skb one is not so obvious, but free() and kfree() have the same behaviour
      (hint :-) ).
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      797659fb
  14. 06 3月, 2007 1 次提交
  15. 03 3月, 2007 1 次提交
    • F
      [PPPOE]: Key connections properly on local device. · 90719dbe
      Florian Zumbiehl 提交于
      It is based on the assumption that an interface's ifindex is basically
      an alias for a local MAC address, so incoming packets now are matched
      to sockets based on remote MAC, session id, and ifindex of the
      interface the packet came in on/the socket was bound to by connect().
      
      For relayed packets, the socket that's used for relaying is selected
      based on destination MAC, session ID and the interface index of the
      interface whose name currently matches the name requested by userspace
      as the relaying source interface.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90719dbe
  16. 13 2月, 2007 1 次提交
  17. 03 12月, 2006 1 次提交
  18. 29 9月, 2006 1 次提交
  19. 14 9月, 2006 1 次提交
  20. 06 6月, 2006 1 次提交
  21. 21 3月, 2006 1 次提交
    • H
      [NET]: Replace skb_pull/skb_postpull_rcsum with skb_pull_rcsum · cbb042f9
      Herbert Xu 提交于
      We're now starting to have quite a number of places that do skb_pull
      followed immediately by an skb_postpull_rcsum.  We can merge these two
      operations into one function with skb_pull_rcsum.  This makes sense
      since most pull operations on receive skb's need to update the
      checksum.
      
      I've decided to make this out-of-line since it is fairly big and the
      fast path where hardware checksums are enabled need to call
      csum_partial anyway.
      
      Since this is a brand new function we get to add an extra check on the
      len argument.  As it is most callers of skb_pull ignore its return
      value which essentially means that there is no check on the len
      argument.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cbb042f9
  22. 04 1月, 2006 2 次提交