1. 28 2月, 2010 12 次提交
  2. 27 2月, 2010 9 次提交
    • P
      rtnetlink: support specifying device flags on device creation · 3729d502
      Patrick McHardy 提交于
      commit e8469ed959c373c2ff9e6f488aa5a14971aebe1f
      Author: Patrick McHardy <kaber@trash.net>
      Date:   Tue Feb 23 20:41:30 2010 +0100
      
      Support specifying the initial device flags when creating a device though
      rtnl_link. Devices allocated by rtnl_create_link() are marked as INITIALIZING
      in order to surpress netlink registration notifications. To complete setup,
      rtnl_configure_link() must be called, which performs the device flag changes
      and invokes the deferred notifiers if everything went well.
      
      Two examples:
      
      # add macvlan to eth0
      #
      $ ip link add link eth0 up allmulticast on type macvlan
      
      [LINK]11: macvlan0@eth0: <BROADCAST,MULTICAST,ALLMULTI,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
          link/ether 26:f8:84:02:f9:2a brd ff:ff:ff:ff:ff:ff
      [ROUTE]ff00::/8 dev macvlan0  table local  metric 256  mtu 1500 advmss 1440 hoplimit 0
      [ROUTE]fe80::/64 dev macvlan0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 0
      [LINK]11: macvlan0@eth0: <BROADCAST,MULTICAST,ALLMULTI,UP,LOWER_UP> mtu 1500
          link/ether 26:f8:84:02:f9:2a
      [ADDR]11: macvlan0    inet6 fe80::24f8:84ff:fe02:f92a/64 scope link
             valid_lft forever preferred_lft forever
      [ROUTE]local fe80::24f8:84ff:fe02:f92a via :: dev lo  table local  proto none  metric 0  mtu 16436 advmss 16376 hoplimit 0
      [ROUTE]default via fe80::215:e9ff:fef0:10f8 dev macvlan0  proto kernel  metric 1024  mtu 1500 advmss 1440 hoplimit 0
      [NEIGH]fe80::215:e9ff:fef0:10f8 dev macvlan0 lladdr 00:15:e9:f0:10:f8 router STALE
      [ROUTE]2001:6f8:974::/64 dev macvlan0  proto kernel  metric 256  expires 0sec mtu 1500 advmss 1440 hoplimit 0
      [PREFIX]prefix 2001:6f8:974::/64 dev macvlan0 onlink autoconf valid 14400 preferred 131084
      [ADDR]11: macvlan0    inet6 2001:6f8:974:0:24f8:84ff:fe02:f92a/64 scope global dynamic
             valid_lft 86399sec preferred_lft 14399sec
      
      # add VLAN to eth1, eth1 is down
      #
      $ ip link add link eth1 up type vlan id 1000
      RTNETLINK answers: Network is down
      
      <no events>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3729d502
    • P
      dev: support deferring device flag change notifications · bd380811
      Patrick McHardy 提交于
      Split dev_change_flags() into two functions: __dev_change_flags() to
      perform the actual changes and __dev_notify_flags() to invoke netdevice
      notifiers. This will be used by rtnl_link to defer netlink notifications
      until the device has been fully configured.
      
      This changes ordering of some operations, in particular:
      
      - netlink notifications are sent after all changes have been performed.
        As a side effect this surpresses one unnecessary netlink message when
        the IFF_UP and other flags are changed simultaneously.
      
      - The NETDEV_UP/NETDEV_DOWN and NETDEV_CHANGE notifiers are invoked
        after all changes have been performed. Their relative is unchanged.
      
      - net_dmaengine_put() is invoked before the NETDEV_DOWN notifier instead
        of afterwards. This should not make any difference since both RX and TX
        are already shut down at this point.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd380811
    • P
      rtnetlink: handle rtnl_link netlink notifications manually · a2835763
      Patrick McHardy 提交于
      In order to support specifying device flags during device creation,
      we must be able to roll back device registration in case setting the
      flags fails without sending any notifications related to the device
      to userspace.
      
      This patch changes rollback_registered_many() and register_netdevice()
      to manually send netlink notifications for devices not handled by
      rtnl_link and allows to defer notifications for devices handled by
      rtnl_link until setup is complete.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a2835763
    • P
      rtnetlink: ignore NETDEV_PRE_UP notifier in rtnetlink_event() · 10de05af
      Patrick McHardy 提交于
      Commit 3b8bcfd5 (net: introduce pre-up netdev notifier) added a new
      notifier which is run before a device is set UP for use by cfg80211.
      
      The patch missed to add the new notifier to the ignore list in
      rtnetlink_event(), so we currently get an unnecessary netlink
      notification before a device is set UP.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10de05af
    • J
      mac80211: fix direct probe loop on ieee80211_work_purge · 0e0a2283
      Juuso Oikarinen 提交于
      If authentication has already been performed when the WLAN interface is
      stopped, (sometimes) the ieee80211_work_purge would corrupt some
      ieee80211_work-structures. The outcome is this (cleaned up):
      
      [ 2252.398681] WARNING: at net/mac80211/work.c:995 ieee80211_work_purge
      [ 2252.466430] Backtrace:
      [ 2252.529266] (ieee80211_work_purge+0x0/0xcc [mac80211])
      [ 2252.546875] (ieee80211_stop+0x0/0x4c0 [mac80211])
      
      Additionally, one would get this, going on regarless of the WLAN interface
      state, going on forever:
      
      [ 2252.859985] wlan0: direct probe to 00:90:4c:60:04:00 (try -996717525)
      [ 2253.055419] wlan0: direct probe to 00:90:4c:60:04:00 (try -996717524)
      [ 2253.250610] wlan0: direct probe to 00:90:4c:60:04:00 (try -996717523)
      [ 2253.446014] wlan0: direct probe to 00:90:4c:60:04:00 (try -996717522)
      [ 2253.641357] wlan0: direct probe to 00:90:4c:60:04:00 (try -996717521)
      Signed-off-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0e0a2283
    • H
      mac80211: use listen interval 5 as default · b446918b
      Helmut Schaa 提交于
      Currently if a driver does not set hw.max_listen_interval a listen
      interval of 1 is negotiated with the AP. Thus, the AP could drop
      buffered frames for us after just one beacon interval which can
      easily happen with the current powersave and scan implementation.
      To avoid this issue increase the default interval to 5 which should
      be a reasonable safe default.
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b446918b
    • J
      netfilter: xtables: restore indentation · 6b4ff2d7
      Jan Engelhardt 提交于
      Signed-off-by: NJan Engelhardt <jengelh@medozas.de>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      6b4ff2d7
    • A
      netfilter: nfnetlink_log: fix silly refcount leak · a49c6503
      Alexey Dobriyan 提交于
      Quick fix for memory/module refcount leak.
      Reference count of listener instance never reaches 0.
      
      Start/stop of ulogd2 is enough to trigger this bug!
      
      Now, refcounting there looks very fishy in particular this code:
      
       	if (!try_module_get(THIS_MODULE)) {
      		...
      
      and creation of listener instance with refcount 2,
      so it may very well be ripped and redone.  :-)
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      a49c6503
    • S
      IPVS: ip_vs_lblcr: use list headA · 51f0bc78
      Simon Horman 提交于
      Use list_head rather than a custom list implementation.
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      51f0bc78
  3. 26 2月, 2010 8 次提交
  4. 25 2月, 2010 5 次提交
  5. 24 2月, 2010 2 次提交
  6. 23 2月, 2010 4 次提交