1. 20 11月, 2009 1 次提交
    • J
      cfg80211: disallow bridging managed/adhoc interfaces · ad4bb6f8
      Johannes Berg 提交于
      A number of people have tried to add a wireless interface
      (in managed mode) to a bridge and then complained that it
      doesn't work. It cannot work, however, because in 802.11
      networks all packets need to be acknowledged and as such
      need to be sent to the right address. Promiscuous doesn't
      help here. The wireless address format used for these
      links has only space for three addresses, the
       * transmitter, which must be equal to the sender (origin)
       * receiver (on the wireless medium), which is the AP in
         the case of managed mode
       * the recipient (destination), which is on the APs local
         network segment
      
      In an IBSS, it is similar, but the receiver and recipient
      must match and the third address is used as the BSSID.
      
      To avoid such mistakes in the future, disallow adding a
      wireless interface to a bridge.
      
      Felix has recently added a four-address mode to the AP
      and client side that can be used (after negotiating that
      it is possible, which must happen out-of-band by setting
      up both sides) for bridging, so allow that case.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ad4bb6f8
  2. 06 11月, 2009 1 次提交
  3. 29 10月, 2009 1 次提交
  4. 29 9月, 2009 1 次提交
  5. 12 9月, 2009 1 次提交
    • M
      net: Add DEVTYPE support for Ethernet based devices · 384912ed
      Marcel Holtmann 提交于
      The Ethernet framing is used for a lot of devices these days. Most
      prominent are WiFi and WiMAX based devices. However for userspace
      application it is important to classify these devices correctly and
      not only see them as Ethernet devices. The daemons like HAL, DeviceKit
      or even NetworkManager with udev support tries to do the classification
      in userspace with a lot trickery and extra system calls. This is not
      good and actually reaches its limitations. Especially since the kernel
      does know the type of the Ethernet device it is pretty stupid.
      
      To solve this problem the underlying device type needs to be set and
      then the value will be exported as DEVTYPE via uevents and available
      within udev.
      
        # cat /sys/class/net/wlan0/uevent
        DEVTYPE=wlan
        INTERFACE=wlan0
        IFINDEX=5
      
      This is similar to subsystems like USB and SCSI that distinguish
      between hosts, devices, disks, partitions etc.
      
      The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual
      device type. All device types are free form, but for convenience the
      same strings as used with RFKILL are choosen.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      384912ed
  6. 14 8月, 2009 1 次提交
  7. 27 7月, 2009 1 次提交
  8. 26 3月, 2009 1 次提交
  9. 21 11月, 2008 1 次提交
  10. 13 11月, 2008 1 次提交
    • W
      netdevice: safe convert to netdev_priv() #part-4 · 524ad0a7
      Wang Chen 提交于
      We have some reasons to kill netdev->priv:
      1. netdev->priv is equal to netdev_priv().
      2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
         netdev_priv() is more flexible than netdev->priv.
      But we cann't kill netdev->priv, because so many drivers reference to it
      directly.
      
      This patch is a safe convert for netdev->priv to netdev_priv(netdev).
      Since all of the netdev->priv is only for read.
      But it is too big to be sent in one mail.
      I split it to 4 parts and make every part smaller than 100,000 bytes,
      which is max size allowed by vger.
      Signed-off-by: NWang Chen <wangchen@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      524ad0a7
  11. 23 10月, 2008 1 次提交
    • H
      net: Fix disjunct computation of netdev features · b63365a2
      Herbert Xu 提交于
      My change
      
          commit e2a6b852
          net: Enable TSO if supported by at least one device
      
      didn't do what was intended because the netdev_compute_features
      function was designed for conjunctions.  So what happened was that
      it would simply take the TSO status of the last constituent device.
      
      This patch extends it to support both conjunctions and disjunctions
      under the new name of netdev_increment_features.
      
      It also adds a new function netdev_fix_features which does the
      sanity checking that usually occurs upon registration.  This ensures
      that the computation doesn't result in an illegal combination
      since this checking is absent when the change is initiated via
      ethtool.
      
      The two users of netdev_compute_features have been converted.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b63365a2
  12. 09 9月, 2008 2 次提交
  13. 31 7月, 2008 1 次提交
    • S
      bridge: send correct MTU value in PMTU (revised) · 4adf0af6
      Simon Wunderlich 提交于
      When bridging interfaces with different MTUs, the bridge correctly chooses
      the minimum of the MTUs of the physical devices as the bridges MTU.  But
      when a frame is passed which fits through the incoming, but not through
      the outgoing interface, a "Fragmentation Needed" packet is generated.
      
      However, the propagated MTU is hardcoded to 1500, which is wrong in this
      situation.  The sender will repeat the packet again with the same frame
      size, and the same problem will occur again.
      
      Instead of sending 1500, the (correct) MTU value of the bridge is now sent
      via PMTU.  To achieve this, the corresponding rtable structure is stored
      in its net_bridge structure.
      
      Modified to get rid of fake_net_device as well.
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4adf0af6
  14. 15 7月, 2008 1 次提交
  15. 03 7月, 2008 1 次提交
  16. 20 6月, 2008 1 次提交
  17. 12 6月, 2008 1 次提交
  18. 05 5月, 2008 2 次提交
  19. 29 4月, 2008 1 次提交
  20. 25 1月, 2008 2 次提交
  21. 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
  22. 31 8月, 2007 1 次提交
  23. 14 8月, 2007 1 次提交
  24. 01 8月, 2007 1 次提交
    • M
      [NET]: ethtool ops are the only way · 61a44b9c
      Matthew Wilcox 提交于
      During the transition to the ethtool_ops way of doing things, we supported
      calling the device's ->do_ioctl method to allow unconverted drivers to
      continue working.  Those days are long behind us, all in-tree drivers
      use the ethtool_ops way, and so we no longer need to support this.
      
      The bonding driver is the biggest beneficiary of this; it no longer
      needs to call ioctl() as a fallback if ethtool_ops aren't supported.
      
      Also put a proper copyright statement on ethtool.c.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61a44b9c
  25. 11 7月, 2007 1 次提交
    • S
      [NET]: IPV6 checksum offloading in network devices · d212f87b
      Stephen Hemminger 提交于
      The existing model for checksum offload does not correctly handle
      devices that can offload IPV4 and IPV6 only. The NETIF_F_HW_CSUM flag
      implies device can do any arbitrary protocol.
      
      This patch:
       * adds NETIF_F_IPV6_CSUM for those devices
       * fixes bnx2 and tg3 devices that need it
       * add NETIF_F_IPV6_CSUM to ipv6 output (incl GSO)
       * fixes assumptions about NETIF_F_ALL_CSUM in nat
       * adjusts bridge union of checksumming computation
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d212f87b
  26. 04 5月, 2007 1 次提交
  27. 26 4月, 2007 2 次提交
  28. 08 3月, 2007 1 次提交
  29. 27 2月, 2007 1 次提交
  30. 14 2月, 2007 1 次提交
  31. 11 2月, 2007 1 次提交
  32. 08 2月, 2007 1 次提交
  33. 22 11月, 2006 1 次提交
  34. 16 10月, 2006 1 次提交
  35. 18 8月, 2006 1 次提交
  36. 30 6月, 2006 1 次提交
    • H
      [NET]: Added GSO header verification · 576a30eb
      Herbert Xu 提交于
      When GSO packets come from an untrusted source (e.g., a Xen guest domain),
      we need to verify the header integrity before passing it to the hardware.
      
      Since the first step in GSO is to verify the header, we can reuse that
      code by adding a new bit to gso_type: SKB_GSO_DODGY.  Packets with this
      bit set can only be fed directly to devices with the corresponding bit
      NETIF_F_GSO_ROBUST.  If the device doesn't have that bit, then the skb
      is fed to the GSO engine which will allow the packet to be sent to the
      hardware if it passes the header check.
      
      This patch changes the sg flag to a full features flag.  The same method
      can be used to implement TSO ECN support.  We simply have to mark packets
      with CWR set with SKB_GSO_ECN so that only hardware with a corresponding
      NETIF_F_TSO_ECN can accept them.  The GSO engine can either fully segment
      the packet, or segment the first MTU and pass the rest to the hardware for
      further segmentation.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      576a30eb