1. 25 3月, 2011 1 次提交
  2. 24 3月, 2011 1 次提交
  3. 16 3月, 2011 1 次提交
  4. 14 3月, 2011 1 次提交
    • H
      ipv4: Fix PMTU update. · 46af3180
      Hiroaki SHIMODA 提交于
      On current net-next-2.6, when Linux receives ICMP Type: 3, Code: 4
      (Destination unreachable (Fragmentation needed)),
      
        icmp_unreach
          -> ip_rt_frag_needed
               (peer->pmtu_expires is set here)
          -> tcp_v4_err
               -> do_pmtu_discovery
                    -> ip_rt_update_pmtu
                         (peer->pmtu_expires is already set,
                          so check_peer_pmtu is skipped.)
                         -> check_peer_pmtu
      
      check_peer_pmtu is skipped and MTU is not updated.
      
      To fix this, let check_peer_pmtu execute unconditionally.
      And some minor fixes
      1) Avoid potential peer->pmtu_expires set to be zero.
      2) In check_peer_pmtu, argument of time_before is reversed.
      3) check_peer_pmtu expects peer->pmtu_orig is initialized as zero,
         but not initialized.
      Signed-off-by: NHiroaki SHIMODA <shimoda.hiroaki@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46af3180
  5. 13 3月, 2011 4 次提交
  6. 11 3月, 2011 3 次提交
  7. 10 3月, 2011 1 次提交
  8. 05 3月, 2011 4 次提交
  9. 03 3月, 2011 3 次提交
  10. 02 3月, 2011 4 次提交
  11. 19 2月, 2011 1 次提交
  12. 18 2月, 2011 5 次提交
  13. 15 2月, 2011 2 次提交
    • D
      ipv4: Cache learned redirect information in inetpeer. · f39925db
      David S. Miller 提交于
      Note that we do not generate the redirect netevent any longer,
      because we don't create a new cached route.
      
      Instead, once the new neighbour is bound to the cached route,
      we emit a neigh update event instead.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f39925db
    • D
      ipv4: Cache learned PMTU information in inetpeer. · 2c8cec5c
      David S. Miller 提交于
      The general idea is that if we learn new PMTU information, we
      bump the peer genid.
      
      This triggers the dst_ops->check() code to validate and if
      necessary propagate the new PMTU value into the metrics.
      
      Learned PMTU information self-expires.
      
      This means that it is not necessary to kill a cached route
      entry just because the PMTU information is too old.
      
      As a consequence:
      
      1) When the path appears unreachable (dst_ops->link_failure
         or dst_ops->negative_advice) we unwind the PMTU state if
         it is out of date, instead of killing the cached route.
      
         A redirected route will still be invalidated in these
         situations.
      
      2) rt_check_expire(), rt_worker_func(), et al. are no longer
         necessary at all.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c8cec5c
  14. 11 2月, 2011 1 次提交
    • D
      inet: Create a mechanism for upward inetpeer propagation into routes. · 6431cbc2
      David S. Miller 提交于
      If we didn't have a routing cache, we would not be able to properly
      propagate certain kinds of dynamic path attributes, for example
      PMTU information and redirects.
      
      The reason is that if we didn't have a routing cache, then there would
      be no way to lookup all of the active cached routes hanging off of
      sockets, tunnels, IPSEC bundles, etc.
      
      Consider the case where we created a cached route, but no inetpeer
      entry existed and also we were not asked to pre-COW the route metrics
      and therefore did not force the creation a new inetpeer entry.
      
      If we later get a PMTU message, or a redirect, and store this
      information in a new inetpeer entry, there is no way to teach that
      cached route about the newly existing inetpeer entry.
      
      The facilities implemented here handle this problem.
      
      First we create a generation ID.  When we create a cached route of any
      kind, we remember the generation ID at the time of attachment.  Any
      time we force-create an inetpeer entry in response to new path
      information, we bump that generation ID.
      
      The dst_ops->check() callback is where the knowledge of this event
      is propagated.  If the global generation ID does not equal the one
      stored in the cached route, and the cached route has not attached
      to an inetpeer yet, we look it up and attach if one is found.  Now
      that we've updated the cached route's information, we update the
      route's generation ID too.
      
      This clears the way for implementing PMTU and redirects directly in
      the inetpeer cache.  There is absolutely no need to consult cached
      route information in order to maintain this information.
      
      At this point nothing bumps the inetpeer genids, that comes in the
      later changes which handle PMTUs and redirects using inetpeers.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6431cbc2
  15. 09 2月, 2011 1 次提交
  16. 05 2月, 2011 2 次提交
  17. 01 2月, 2011 2 次提交
    • D
      ipv4: Consolidate all default route selection implementations. · 0c838ff1
      David S. Miller 提交于
      Both fib_trie and fib_hash have a local implementation of
      fib_table_select_default().  This is completely unnecessary
      code duplication.
      
      Since we now remember the fib_table and the head of the fib
      alias list of the default route, we can implement one single
      generic version of this routine.
      
      Looking at the fib_hash implementation you may get the impression
      that it's possible for there to be multiple top-level routes in
      the table for the default route.  The truth is, it isn't, the
      insert code will only allow one entry to exist in the zero
      prefix hash table, because all keys evaluate to zero and all
      keys in a hash table must be unique.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c838ff1
    • R
      net: Add default_mtu() methods to blackhole dst_ops · ec831ea7
      Roland Dreier 提交于
      When an IPSEC SA is still being set up, __xfrm_lookup() will return
      -EREMOTE and so ip_route_output_flow() will return a blackhole route.
      This can happen in a sndmsg call, and after d33e4553 ("net: Abstract
      default MTU metric calculation behind an accessor.") this leads to a
      crash in ip_append_data() because the blackhole dst_ops have no
      default_mtu() method and so dst_mtu() calls a NULL pointer.
      
      Fix this by adding default_mtu() methods (that simply return 0, matching
      the old behavior) to the blackhole dst_ops.
      
      The IPv4 part of this patch fixes a crash that I saw when using an IPSEC
      VPN; the IPv6 part is untested because I don't have an IPv6 VPN, but it
      looks to be needed as well.
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ec831ea7
  18. 29 1月, 2011 1 次提交
  19. 28 1月, 2011 2 次提交