1. 12 9月, 2008 6 次提交
  2. 11 9月, 2008 1 次提交
    • D
      ipv6: On interface down/unregister, purge icmp routes too. · 1e493d19
      David S. Miller 提交于
      Johannes Berg reported that occaisionally, bringing an interface
      down or unregistering it would hang for up to 30 seconds.  Using
      debugging output he provided it became clear that ICMP6 routes
      were the culprit.
      
      The problem is that ICMP6 routes live in their own world totally
      separate from normal ipv6 routes.  So there are all kinds of special
      cases throughout the ipv6 code to handle this.
      
      While we should really try to unify all of this stuff somehow,
      for the time being let's fix this by purging the ICMP6 routes
      that match the device in question during rt6_ifdown().
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e493d19
  3. 10 9月, 2008 4 次提交
  4. 09 9月, 2008 18 次提交
    • H
      ipsec: Restore larval states and socket policies in dump · 225f4005
      Herbert Xu 提交于
      The commit commit 4c563f76 ("[XFRM]:
      Speed up xfrm_policy and xfrm_state walking") inadvertently removed
      larval states and socket policies from netlink dumps.  This patch
      restores them.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      225f4005
    • G
      This reverts "Merge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/dccp_exp" · 410e27a4
      Gerrit Renker 提交于
      as it accentally contained the wrong set of patches. These will be
      submitted separately.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      410e27a4
    • M
      [Bluetooth] Reject L2CAP connections on an insecure ACL link · e7c29cb1
      Marcel Holtmann 提交于
      The Security Mode 4 of the Bluetooth 2.1 specification has strict
      authentication and encryption requirements. It is the initiators job
      to create a secure ACL link. However in case of malicious devices, the
      acceptor has to make sure that the ACL is encrypted before allowing
      any kind of L2CAP connection. The only exception here is the PSM 1 for
      the service discovery protocol, because that is allowed to run on an
      insecure ACL link.
      
      Previously it was enough to reject a L2CAP connection during the
      connection setup phase, but with Bluetooth 2.1 it is forbidden to
      do any L2CAP protocol exchange on an insecure link (except SDP).
      
      The new hci_conn_check_link_mode() function can be used to check the
      integrity of an ACL link. This functions also takes care of the cases
      where Security Mode 4 is disabled or one of the devices is based on
      an older specification.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      e7c29cb1
    • M
      [Bluetooth] Enforce correct authentication requirements · 09ab6f4c
      Marcel Holtmann 提交于
      With the introduction of Security Mode 4 and Simple Pairing from the
      Bluetooth 2.1 specification it became mandatory that the initiator
      requires authentication and encryption before any L2CAP channel can
      be established. The only exception here is PSM 1 for the service
      discovery protocol (SDP). It is meant to be used without any encryption
      since it contains only public information. This is how Bluetooth 2.0
      and before handle connections on PSM 1.
      
      For Bluetooth 2.1 devices the pairing procedure differentiates between
      no bonding, general bonding and dedicated bonding. The L2CAP layer
      wrongly uses always general bonding when creating new connections, but it
      should not do this for SDP connections. In this case the authentication
      requirement should be no bonding and the just-works model should be used,
      but in case of non-SDP connection it is required to use general bonding.
      
      If the new connection requires man-in-the-middle (MITM) protection, it
      also first wrongly creates an unauthenticated link key and then later on
      requests an upgrade to an authenticated link key to provide full MITM
      protection. With Simple Pairing the link key generation is an expensive
      operation (compared to Bluetooth 2.0 and before) and doing this twice
      during a connection setup causes a noticeable delay when establishing
      a new connection. This should be avoided to not regress from the expected
      Bluetooth 2.0 connection times. The authentication requirements are known
      up-front and so enforce them.
      
      To fulfill these requirements the hci_connect() function has been extended
      with an authentication requirement parameter that will be stored inside
      the connection information and can be retrieved by userspace at any
      time. This allows the correct IO capabilities exchange and results in
      the expected behavior.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      09ab6f4c
    • M
      [Bluetooth] Fix reference counting during ACL config stage · f1c08ca5
      Marcel Holtmann 提交于
      The ACL config stage keeps holding a reference count on incoming
      connections when requesting the extended features. This results in
      keeping an ACL link up without any users. The problem here is that
      the Bluetooth specification doesn't define an ownership of the ACL
      link and thus it can happen that the implementation on the initiator
      side doesn't care about disconnecting unused links. In this case the
      acceptor needs to take care of this.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      f1c08ca5
    • S
      ipvs: Embed user stats structure into kernel stats structure · e9c0ce23
      Sven Wegener 提交于
      Instead of duplicating the fields, integrate a user stats structure into
      the kernel stats structure. This is more robust when the members are
      changed, because they are now automatically kept in sync.
      Signed-off-by: NSven Wegener <sven.wegener@stealer.net>
      Reviewed-by: NJulius Volz <juliusv@google.com>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      e9c0ce23
    • S
      ipvs: Restrict connection table size via Kconfig · 2206a3f5
      Sven Wegener 提交于
      Instead of checking the value in include/net/ip_vs.h, we can just
      restrict the range in our Kconfig file. This will prevent values outside
      of the range early.
      Signed-off-by: NSven Wegener <sven.wegener@stealer.net>
      Reviewed-by: NJulius Volz <juliusv@google.com>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      2206a3f5
    • J
      IPVS: Remove incorrect ip_route_me_harder(), fix IPv6 · 9d7f2a2b
      Julius Volz 提交于
      Remove an incorrect ip_route_me_harder() that was probably a result of
      merging my IPv6 patches with the local client patches. With this, IPv6+NAT
      are working again.
      Signed-off-by: NJulius Volz <juliusv@google.com>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      9d7f2a2b
    • S
      ipvs: handle PARTIAL_CHECKSUM · 503e81f6
      Simon Horman 提交于
      Now that LVS can load balance locally generated traffic, packets may come
      from the loopback device and thus may have a partial checksum.
      
      The existing code allows for the case where there is no checksum at all for
      TCP, however Herbert Xu has confirmed that this is not legal.
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Acked-by: NJulius Volz <juliusv@google.com>
      503e81f6
    • A
    • A
      netns bridge: allow bridges in netns! · 4aa678ba
      Alexey Dobriyan 提交于
      Bridge as netdevice doesn't cross netns boundaries.
      
      Bridge ports and bridge itself live in same netns.
      
      Notifiers are fixed.
      
      netns propagated from userspace socket for setup and teardown.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Acked-by: NStephen Hemminger <shemming@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4aa678ba
    • A
      warn: Turn the netdev timeout WARN_ON() into a WARN() · 5337407c
      Arjan van de Ven 提交于
      this patch turns the netdev timeout WARN_ON_ONCE() into a WARN_ONCE(),
      so that the device and driver names are inside the warning message.
      This helps automated tools like kerneloops.org to collect the data
      and do statistics, as well as making it more likely that humans
      cut-n-paste the important message as part of a bugreport.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5337407c
    • H
      net: Enable TSO if supported by at least one device · e2a6b852
      Herbert Xu 提交于
      As it stands users of netdev_compute_features (e.g., bridges/bonding)
      will only enable TSO if all consituent devices support it.  This
      is unnecessarily pessimistic since even on devices that do not
      support hardware TSO and SG, emulated TSO still performs to a par
      with TSO off.
      
      This patch enables TSO if at least on constituent device supports
      it in hardware.
      
      The direct beneficiaries will be virtualisation that uses bridging
      since this means that TSO will always be enabled for communication
      from the host to the guests.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2a6b852
    • S
      bridge: don't allow setting hello time to zero · 8d4698f7
      Stephen Hemminger 提交于
      Dushan Tcholich reports that on his system ksoftirqd can consume
      between %6 to %10 of cpu time, and cause ~200 context switches per
      second.
      
      He then correlated this with a report by bdupree@techfinesse.com:
      
      	http://marc.info/?l=linux-kernel&m=119613299024398&w=2
      
      and the culprit cause seems to be starting the bridge interface.
      In particular, when starting the bridge interface, his scripts
      are specifying a hello timer interval of "0".
      
      The bridge hello time can't be safely set to values less than 1
      second, otherwise it is possible to end up with a runaway timer.
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d4698f7
    • D
      netns : fix kernel panic in timewait socket destruction · d315492b
      Daniel Lezcano 提交于
      How to reproduce ?
       - create a network namespace
       - use tcp protocol and get timewait socket
       - exit the network namespace
       - after a moment (when the timewait socket is destroyed), the kernel
         panics.
      
      # BUG: unable to handle kernel NULL pointer dereference at
      0000000000000007
      IP: [<ffffffff821e394d>] inet_twdr_do_twkill_work+0x6e/0xb8
      PGD 119985067 PUD 11c5c0067 PMD 0
      Oops: 0000 [1] SMP
      CPU 1
      Modules linked in: ipv6 button battery ac loop dm_mod tg3 libphy ext3 jbd
      edd fan thermal processor thermal_sys sg sata_svw libata dock serverworks
      sd_mod scsi_mod ide_disk ide_core [last unloaded: freq_table]
      Pid: 0, comm: swapper Not tainted 2.6.27-rc2 #3
      RIP: 0010:[<ffffffff821e394d>] [<ffffffff821e394d>]
      inet_twdr_do_twkill_work+0x6e/0xb8
      RSP: 0018:ffff88011ff7fed0 EFLAGS: 00010246
      RAX: ffffffffffffffff RBX: ffffffff82339420 RCX: ffff88011ff7ff30
      RDX: 0000000000000001 RSI: ffff88011a4d03c0 RDI: ffff88011ac2fc00
      RBP: ffffffff823392e0 R08: 0000000000000000 R09: ffff88002802a200
      R10: ffff8800a5c4b000 R11: ffffffff823e4080 R12: ffff88011ac2fc00
      R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000000
      FS: 0000000041cbd940(0000) GS:ffff8800bff839c0(0000)
      knlGS:0000000000000000
      CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      CR2: 0000000000000007 CR3: 00000000bd87c000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process swapper (pid: 0, threadinfo ffff8800bff9e000, task
      ffff88011ff76690)
      Stack: ffffffff823392e0 0000000000000100 ffffffff821e3a3a
      0000000000000008
      0000000000000000 ffffffff821e3a61 ffff8800bff7c000 ffffffff8203c7e7
      ffff88011ff7ff10 ffff88011ff7ff10 0000000000000021 ffffffff82351108
      Call Trace:
      <IRQ> [<ffffffff821e3a3a>] ? inet_twdr_hangman+0x0/0x9e
      [<ffffffff821e3a61>] ? inet_twdr_hangman+0x27/0x9e
      [<ffffffff8203c7e7>] ? run_timer_softirq+0x12c/0x193
      [<ffffffff820390d1>] ? __do_softirq+0x5e/0xcd
      [<ffffffff8200d08c>] ? call_softirq+0x1c/0x28
      [<ffffffff8200e611>] ? do_softirq+0x2c/0x68
      [<ffffffff8201a055>] ? smp_apic_timer_interrupt+0x8e/0xa9
      [<ffffffff8200cad6>] ? apic_timer_interrupt+0x66/0x70
      <EOI> [<ffffffff82011f4c>] ? default_idle+0x27/0x3b
      [<ffffffff8200abbd>] ? cpu_idle+0x5f/0x7d
      
      
      Code: e8 01 00 00 4c 89 e7 41 ff c5 e8 8d fd ff ff 49 8b 44 24 38 4c 89 e7
      65 8b 14 25 24 00 00 00 89 d2 48 8b 80 e8 00 00 00 48 f7 d0 <48> 8b 04 d0
      48 ff 40 58 e8 fc fc ff ff 48 89 df e8 c0 5f 04 00
      RIP [<ffffffff821e394d>] inet_twdr_do_twkill_work+0x6e/0xb8
      RSP <ffff88011ff7fed0>
      CR2: 0000000000000007
      
      This patch provides a function to purge all timewait sockets related
      to a network namespace. The timewait sockets life cycle is not tied with
      the network namespace, that means the timewait sockets stay alive while
      the network namespace dies. The timewait sockets are for avoiding to
      receive a duplicate packet from the network, if the network namespace is
      freed, the network stack is removed, so no chance to receive any packets
      from the outside world. Furthermore, having a pending destruction timer
      on these sockets with a network namespace freed is not safe and will lead
      to an oops if the timer callback which try to access data belonging to 
      the namespace like for example in:
      	inet_twdr_do_twkill_work
      		-> NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITED);
      
      Purging the timewait sockets at the network namespace destruction will:
       1) speed up memory freeing for the namespace
       2) fix kernel panic on asynchronous timewait destruction
      Signed-off-by: NDaniel Lezcano <dlezcano@fr.ibm.com>
      Acked-by: NDenis V. Lunev <den@openvz.org>
      Acked-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d315492b
    • R
      mac80211: add missing kernel-doc · 701b9cb3
      Randy Dunlap 提交于
      Fix mac80211 kernel-doc missing struct field:
      
      Warning(linux-2.6.27-rc1-git2//net/mac80211/sta_info.h:329): No description found for parameter 'tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1]'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      701b9cb3
    • E
      mac80211: Fix rate scale initialization in IBSS · 8e1535d5
      Emmanuel Grumbach 提交于
      This patch address some IBSS rate issues introduced or not covered
      by "mac80211: eliminate IBSS warning in rate_lowest_index()" and
      "cfg80211 API for channels/bitrates, mac80211 and driver conversion".
      
      This patch:
      1. Moves addition of IBSS station from
      prepare_for_handlers to ieee80211_rx_bss_info when triggered from beacon
      eliminating bogus supported rates.
      2. Initialize properly supported rates also in IBSS merging
      3. Ensure that mandatory rates are always added into supported
      rates. This is needed in case when station addition is triggered from
      non beacon/probe packet. Some management frames need to be sent
      4. Remove initialization of supported rates from self rates. This path
      was dead code after 6bc37c06bc4 and in general incorrect.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
      Cc: Vladimir Koutny <vlado@work.ksp.sk>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8e1535d5
    • T
      mac80211: Fix low bit rate in IBSS · 9818babc
      Tomas Winkler 提交于
      This patch fixes regression in iwlwifi IBSS rate scaling caused by patch:
      
          commit 6bc37c06bc424bcf3f944e6a79e2d5bb537e02ed
          Author: Vladimir Koutny <vlado@work.ksp.sk>
          Date:   Fri Jun 13 16:50:44 2008 +0200
      
              mac80211: eliminate IBSS warning in rate_lowest_index()
      
      An IBSS station is added in prepare_for_handlers where the rate scaling was
      initialized only with single rate matching the received packet.
      The correct rate scale information should be updated only in
      ieee80211_rx_bss_info function where beacon is parsed. Because
      of coding error the rate info was left untouched.
      If a beacon has triggered the connection the rate remined 1Mbps.
      This patch fixes this coding error
      Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
      Cc: Vladimir Koutny <vlado@work.ksp.sk>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9818babc
  5. 08 9月, 2008 11 次提交