1. 25 1月, 2014 1 次提交
  2. 20 1月, 2014 1 次提交
  3. 18 1月, 2014 1 次提交
  4. 16 1月, 2014 2 次提交
    • T
      ipv6 addrconf: don't cleanup prefix route for IFA_F_NOPREFIXROUTE · 5b84efec
      Thomas Haller 提交于
      Refactor the deletion/update of prefix routes when removing an
      address. Now also consider IFA_F_NOPREFIXROUTE and if there is an address
      present with this flag, to not cleanup the route. Instead, assume
      that userspace is taking care of this route.
      
      Also perform the same cleanup, when userspace changes an existing address
      to add NOPREFIXROUTE (to an address that didn't have this flag). This is
      done because when the address was added, a prefix route was created for it.
      Since the user now wants to handle this route by himself, we cleanup this
      route.
      
      This cleanup of the route is not totally robust. There is no guarantee,
      that the route we are about to delete was really the one added by the
      kernel. This behavior does not change by the patch, and in practice it
      should work just fine.
      Signed-off-by: NThomas Haller <thaller@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b84efec
    • T
      ipv6 addrconf: add IFA_F_NOPREFIXROUTE flag to suppress creation of IP6 routes · 761aac73
      Thomas Haller 提交于
      When adding/modifying an IPv6 address, the userspace application needs
      a way to suppress adding a prefix route. This is for example relevant
      together with IFA_F_MANAGERTEMPADDR, where userspace creates autoconf
      generated addresses, but depending on on-link, no route for the
      prefix should be added.
      Signed-off-by: NThomas Haller <thaller@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      761aac73
  5. 15 1月, 2014 2 次提交
  6. 10 1月, 2014 1 次提交
  7. 07 1月, 2014 1 次提交
  8. 03 1月, 2014 1 次提交
  9. 02 1月, 2014 1 次提交
  10. 01 1月, 2014 1 次提交
  11. 23 12月, 2013 1 次提交
  12. 12 12月, 2013 1 次提交
  13. 11 12月, 2013 1 次提交
  14. 10 12月, 2013 3 次提交
  15. 07 12月, 2013 2 次提交
  16. 03 12月, 2013 1 次提交
  17. 15 11月, 2013 3 次提交
  18. 06 11月, 2013 1 次提交
    • J
      net: Explicitly initialize u64_stats_sync structures for lockdep · 827da44c
      John Stultz 提交于
      In order to enable lockdep on seqcount/seqlock structures, we
      must explicitly initialize any locks.
      
      The u64_stats_sync structure, uses a seqcount, and thus we need
      to introduce a u64_stats_init() function and use it to initialize
      the structure.
      
      This unfortunately adds a lot of fairly trivial initialization code
      to a number of drivers. But the benefit of ensuring correctness makes
      this worth while.
      
      Because these changes are required for lockdep to be enabled, and the
      changes are quite trivial, I've not yet split this patch out into 30-some
      separate patches, as I figured it would be better to get the various
      maintainers thoughts on how to best merge this change along with
      the seqcount lockdep enablement.
      
      Feedback would be appreciated!
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Acked-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: James Morris <jmorris@namei.org>
      Cc: Jesse Gross <jesse@nicira.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Mirko Lindner <mlindner@marvell.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Roger Luethi <rl@hellgate.ch>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Wensong Zhang <wensong@linux-vs.org>
      Cc: netdev@vger.kernel.org
      Link: http://lkml.kernel.org/r/1381186321-4906-2-git-send-email-john.stultz@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      827da44c
  19. 29 10月, 2013 1 次提交
  20. 01 10月, 2013 1 次提交
    • P
      ipv6: Fix preferred_lft not updating in some cases · c9d55d5b
      Paul Marks 提交于
      Consider the scenario where an IPv6 router is advertising a fixed
      preferred_lft of 1800 seconds, while the valid_lft begins at 3600
      seconds and counts down in realtime.
      
      A client should reset its preferred_lft to 1800 every time the RA is
      received, but a bug is causing Linux to ignore the update.
      
      The core problem is here:
        if (prefered_lft != ifp->prefered_lft) {
      
      Note that ifp->prefered_lft is an offset, so it doesn't decrease over
      time.  Thus, the comparison is always (1800 != 1800), which fails to
      trigger an update.
      
      The most direct solution would be to compute a "stored_prefered_lft",
      and use that value in the comparison.  But I think that trying to filter
      out unnecessary updates here is a premature optimization.  In order for
      the filter to apply, both of these would need to hold:
      
        - The advertised valid_lft and preferred_lft are both declining in
          real time.
        - No clock skew exists between the router & client.
      
      So in this patch, I've set "update_lft = 1" unconditionally, which
      allows the surrounding code to be greatly simplified.
      Signed-off-by: NPaul Marks <pmarks@google.com>
      Acked-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c9d55d5b
  21. 29 9月, 2013 1 次提交
  22. 04 9月, 2013 1 次提交
  23. 01 9月, 2013 3 次提交
  24. 30 8月, 2013 1 次提交
  25. 21 8月, 2013 4 次提交
  26. 20 8月, 2013 1 次提交
    • H
      ipv6: remove max_addresses check from ipv6_create_tempaddr · 4b08a8f1
      Hannes Frederic Sowa 提交于
      Because of the max_addresses check attackers were able to disable privacy
      extensions on an interface by creating enough autoconfigured addresses:
      
      <http://seclists.org/oss-sec/2012/q4/292>
      
      But the check is not actually needed: max_addresses protects the
      kernel to install too many ipv6 addresses on an interface and guards
      addrconf_prefix_rcv to install further addresses as soon as this limit
      is reached. We only generate temporary addresses in direct response of
      a new address showing up. As soon as we filled up the maximum number of
      addresses of an interface, we stop installing more addresses and thus
      also stop generating more temp addresses.
      
      Even if the attacker tries to generate a lot of temporary addresses
      by announcing a prefix and removing it again (lifetime == 0) we won't
      install more temp addresses, because the temporary addresses do count
      to the maximum number of addresses, thus we would stop installing new
      autoconfigured addresses when the limit is reached.
      
      This patch fixes CVE-2013-0343 (but other layer-2 attacks are still
      possible).
      
      Thanks to Ding Tianhong to bring this topic up again.
      
      Cc: Ding Tianhong <dingtianhong@huawei.com>
      Cc: George Kargiotakis <kargig@void.gr>
      Cc: P J P <ppandit@redhat.com>
      Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Acked-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b08a8f1
  27. 14 8月, 2013 1 次提交
    • H
      ipv6: make unsolicited report intervals configurable for mld · fc4eba58
      Hannes Frederic Sowa 提交于
      Commit cab70040 ("net: igmp:
      Reduce Unsolicited report interval to 1s when using IGMPv3") and
      2690048c ("net: igmp: Allow user-space
      configuration of igmp unsolicited report interval") by William Manley made
      igmp unsolicited report intervals configurable per interface and corrected
      the interval of unsolicited igmpv3 report messages resendings to 1s.
      
      Same needs to be done for IPv6:
      
      MLDv1 (RFC2710 7.10.): 10 seconds
      MLDv2 (RFC3810 9.11.): 1 second
      
      Both intervals are configurable via new procfs knobs
      mldv1_unsolicited_report_interval and mldv2_unsolicited_report_interval.
      
      (also added .force_mld_version to ipv6_devconf_dflt to bring structs in
      line without semantic changes)
      
      v2:
      a) Joined documentation update for IPv4 and IPv6 MLD/IGMP
         unsolicited_report_interval procfs knobs.
      b) incorporate stylistic feedback from William Manley
      
      v3:
      a) add new DEVCONF_* values to the end of the enum (thanks to David
         Miller)
      
      Cc: Cong Wang <xiyou.wangcong@gmail.com>
      Cc: William Manley <william.manley@youview.com>
      Cc: Benjamin LaHaise <bcrl@kvack.org>
      Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fc4eba58
  28. 02 8月, 2013 1 次提交
    • F
      ipv6: bump genid when delete/add address · 439677d7
      fan.du 提交于
      Server           Client
      2001:1::803/64  <-> 2001:1::805/64
      2001:2::804/64  <-> 2001:2::806/64
      
      Server side fib binary tree looks like this:
      
                                         (2001:/64)
                                         /
                                        /
                         ffff88002103c380
                       /                 \
           (2)        /                   \
       (2001::803/128)                     ffff880037ac07c0
                                          /               \
                                         /                 \  (3)
                            ffff880037ac0640               (2001::806/128)
                             /             \
                   (1)      /               \
              (2001::804/128)               (2001::805/128)
      
      Delete 2001::804/64 won't cause prefix route deleted as well as rt in (3)
      destinate to 2001::806 with source address as 2001::804/64. That's because
      2001::803/64 is still alive, which make onlink=1 in ipv6_del_addr, this is
      where the substantial difference between same prefix configuration and
      different prefix configuration :) So packet are still transmitted out to
      2001::806 with source address as 2001::804/64.
      
      So bump genid will clear rt in (3), and up layer protocol will eventually
      find the right one for themselves.
      
      This problem arised from the discussion in here:
      http://marc.info/?l=linux-netdev&m=137404469219410&w=4Signed-off-by: NFan Du <fan.du@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      439677d7