1. 10 2月, 2011 1 次提交
  2. 09 2月, 2011 4 次提交
    • D
      net: Kill NETEVENT_PMTU_UPDATE. · 8d13a2a9
      David S. Miller 提交于
      Nobody actually does anything in response to the event,
      so just kill it off.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d13a2a9
    • D
      net: Fix lockdep regression caused by initializing netdev queues too early. · 8d3bdbd5
      David S. Miller 提交于
      In commit aa942104 ("net: init ingress
      queue") we moved the allocation and lock initialization of the queues
      into alloc_netdev_mq() since register_netdevice() is way too late.
      
      The problem is that dev->type is not setup until the setup()
      callback is invoked by alloc_netdev_mq(), and the dev->type is
      what determines the lockdep class to use for the locks in the
      queues.
      
      Fix this by doing the queue allocation after the setup() callback
      runs.
      
      This is safe because the setup() callback is not allowed to make any
      state changes that need to be undone on error (memory allocations,
      etc.).  It may, however, make state changes that are undone by
      free_netdev() (such as netif_napi_add(), which is done by the
      ipoib driver's setup routine).
      
      The previous code also leaked a reference to the &init_net namespace
      object on RX/TX queue allocation failures.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d3bdbd5
    • D
      net/caif: Fix dangling list pointer in freed object on error. · b2df5a84
      David S. Miller 提交于
      rtnl_link_ops->setup(), and the "setup" callback passed to alloc_netdev*(),
      cannot make state changes which need to be undone on failure.  There is
      no cleanup mechanism available at this point.
      
      So we have to add the caif private instance to the global list once we
      are sure that register_netdev() has succedded in ->newlink().
      
      Otherwise, if register_netdev() fails, the caller will invoke free_netdev()
      and we will have a reference to freed up memory on the chnl_net_list.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b2df5a84
    • N
      ipsec: allow to align IPv4 AH on 32 bits · fa9921e4
      Nicolas Dichtel 提交于
      The Linux IPv4 AH stack aligns the AH header on a 64 bit boundary
      (like in IPv6). This is not RFC compliant (see RFC4302, Section
      3.3.3.2.1), it should be aligned on 32 bits.
      
      For most of the authentication algorithms, the ICV size is 96 bits.
      The AH header alignment on 32 or 64 bits gives the same results.
      
      However for SHA-256-128 for instance, the wrong 64 bit alignment results
      in adding useless padding in IPv4 AH, which is forbidden by the RFC.
      
      To avoid breaking backward compatibility, we use a new flag
      (XFRM_STATE_ALIGN4) do change original behavior.
      
      Initial patch from Dang Hongwu <hongwu.dang@6wind.com> and
      Christophe Gouault <christophe.gouault@6wind.com>.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa9921e4
  3. 08 2月, 2011 7 次提交
  4. 07 2月, 2011 1 次提交
  5. 05 2月, 2011 7 次提交
    • D
      inetpeer: Move ICMP rate limiting state into inet_peer entries. · 92d86829
      David S. Miller 提交于
      Like metrics, the ICMP rate limiting bits are cached state about
      a destination.  So move it into the inet_peer entries.
      
      If an inet_peer cannot be bound (the reason is memory allocation
      failure or similar), the policy is to allow.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      92d86829
    • D
      ipv4: Don't miss existing cached metrics in new routes. · 0131ba45
      David S. Miller 提交于
      Always lookup to see if we have an existing inetpeer entry for
      a route.  Let FLOWI_FLAG_PRECOW_METRICS merely influence the
      "create" argument to rt_bind_peer().
      
      Also, call rt_bind_peer() unconditionally since it is not
      possible for rt->peer to be non-NULL at this point.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0131ba45
    • B
      mac80211: Optimize scans on current operating channel. · b23b025f
      Ben Greear 提交于
      This should decrease un-necessary flushes, on/off channel work,
      and channel changes in cases where the only scanned channel is
      the current operating channel.
      
      * Removes SCAN_OFF_CHANNEL flag, uses SDATA_STATE_OFFCHANNEL
        and is-scanning flags instead.
      
      * Add helper method to determine if we are currently configured
        for the operating channel.
      
      * Do no blindly go off/on channel in work.c  Instead, only call
        appropriate on/off code when we really need to change channels.
        Always enable offchannel-ps mode when starting work,
        and disable it when we are done.
      
      * Consolidate ieee80211_offchannel_stop_station and
        ieee80211_offchannel_stop_beaconing, call it
        ieee80211_offchannel_stop_vifs instead.
      
      * Accept non-beacon frames when scanning on operating channel.
      
      * Scan state machine optimized to minimize on/off channel
        transitions.  Also, when going on-channel, go ahead and
        re-enable beaconing.  We're going to be there for 200ms,
        so seems like some useful beaconing could happen.
        Always enable offchannel-ps mode when starting software
        scan, and disable it when we are done.
      
      * Grab local->mtx earlier in __ieee80211_scan_completed_finish
        so that we are protected when calling hw_config(), etc.
      
      * Pass probe-responses up the stack if scanning on local
        channel, so that mlme can take a look.
      Signed-off-by: NBen Greear <greearb@candelatech.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b23b025f
    • F
      mac80211: do not send duplicate data frames to the cooked monitor interface · b1f93314
      Felix Fietkau 提交于
      I can't think of a valid use case for this aside from debugging (which can
      also be done with a real monitor interface), and dropping these frames saves
      some precious CPU cycles.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b1f93314
    • R
      mac80211: do not restart ps timer during scan or offchannel · 8c99f691
      Rajkumar Manoharan 提交于
      While leaving oper channel, STA informs sleep state to AP to
      stop sending data. Till sending ack for the nullfunc, AP
      continues to send the data to STA which restarts ps_timer that
      is causing unnecessary nullfunc exchange on timer expiry
      when the STA was already moved to offchannel. So don't restart ps_timer
      on data reception during scan. This issue was identified by
      the following warning.
      
      WARNING: at net/mac80211/tx.c:661 invoke_tx_handlers+0xf07/0x1330 [mac80211]
      wlan0: Dropped data frame as no usable bitrate found while scanning and
      associated. Target station: 00:03:7f:0b:a6:1b on 5 GHz band
      Call Trace:
        [<ffffffffa0413ba7>] invoke_tx_handlers+0xf07/0x1330 [mac80211]
        [<ffffffffa0414056>] ieee80211_tx+0x86/0x2c0 [mac80211]
        [<ffffffffa0414345>] ieee80211_xmit+0xb5/0x1d0 [mac80211]
        [<ffffffffa04037e0>] ieee80211_dynamic_ps_enable_work+0x0/0xb0 [mac80211]
        [<ffffffffa04158cf>] ieee80211_tx_skb+0x4f/0x60 [mac80211]
        [<ffffffffa04026e6>] ieee80211_send_nullfunc+0x46/0x60 [mac80211]
        [<ffffffffa0403885>] ieee80211_dynamic_ps_enable_work+0xa5/0xb0 [mac80211]
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NRajkumar Manoharan <rmanoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8c99f691
    • C
      mac80211: fix race between next beacon dtim and ieee80211_get_buffered_bc · 512119b3
      Christian Lamparter 提交于
      On review of 'zd1211rw: implement beacon fetching and handling
      ieee80211_get_buffered_bc()', Christian Lamparter noted that [1]:
      
         Since zd_beacon_done also uploads the next beacon so long in advance,
         there could be an equally long race between the outdated state of the
         next beacon's DTIM broadcast traffic indicator (802.11-2007 7.3.2.6)
         which -in your case- was uploaded almost a beacon interval ago and
         the xmit of ieee80211_get_buffered_bc *now*.
      
         The dtim bc/mc bit might be not set, when a mc/bc arrived after the
         beacon was uploaded, but before the "beacon done event" from the
         hardware. So, dozing stations don't expect the broadcast traffic
         and of course, they might miss it completely.
      
         It's probably better to fix this in mac80211 (see the attached hack).
      
      [1] http://marc.info/?l=linux-wireless&m=129435041117256&w=2
      
      CC: Christian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      512119b3
    • P
      bridge: Don't put partly initialized fdb into hash · 1158f762
      Pavel Emelyanov 提交于
      The fdb_create() puts a new fdb into hash with only addr set. This is
      not good, since there are callers, that search the hash w/o the lock
      and access all the other its fields.
      
      Applies to current netdev tree.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1158f762
  6. 04 2月, 2011 14 次提交
  7. 03 2月, 2011 6 次提交