1. 11 2月, 2012 5 次提交
  2. 10 2月, 2012 3 次提交
  3. 09 2月, 2012 12 次提交
  4. 08 2月, 2012 7 次提交
  5. 07 2月, 2012 9 次提交
  6. 06 2月, 2012 1 次提交
  7. 05 2月, 2012 3 次提交
    • J
      ipv4: reset flowi parameters on route connect · e6b45241
      Julian Anastasov 提交于
      Eric Dumazet found that commit 813b3b5d
      (ipv4: Use caller's on-stack flowi as-is in output
      route lookups.) that comes in 3.0 added a regression.
      The problem appears to be that resulting flowi4_oif is
      used incorrectly as input parameter to some routing lookups.
      The result is that when connecting to local port without
      listener if the IP address that is used is not on a loopback
      interface we incorrectly assign RTN_UNICAST to the output
      route because no route is matched by oif=lo. The RST packet
      can not be sent immediately by tcp_v4_send_reset because
      it expects RTN_LOCAL.
      
      	So, change ip_route_connect and ip_route_newports to
      update the flowi4 fields that are input parameters because
      we do not want unnecessary binding to oif.
      
      	To make it clear what are the input parameters that
      can be modified during lookup and to show which fields of
      floiw4 are reused add a new function to update the flowi4
      structure: flowi4_update_output.
      
      Thanks to Yurij M. Plotnikov for providing a bug report including a
      program to reproduce the problem.
      
      Thanks to Eric Dumazet for tracking the problem down to
      tcp_v4_send_reset and providing initial fix.
      Reported-by: NYurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru>
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6b45241
    • S
      tcp_v4_send_reset: binding oif to iif in no sock case · e2446eaa
      Shawn Lu 提交于
      Binding RST packet outgoing interface to incoming interface
      for tcp v4 when there is no socket associate with it.
      when sk is not NULL, using sk->sk_bound_dev_if instead.
      (suggested by Eric Dumazet).
      
      This has few benefits:
      1. tcp_v6_send_reset already did that.
      2. This helps tcp connect with SO_BINDTODEVICE set. When
      connection is lost, we still able to sending out RST using
      same interface.
      3. we are sending reply, it is most likely to be succeed
      if iif is used
      Signed-off-by: NShawn Lu <shawn.lu@ericsson.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2446eaa
    • N
      netprio_cgroup: Fix obo in get_prioidx · 5962b35c
      Neil Horman 提交于
      It was recently pointed out to me that the get_prioidx function sets a bit in
      the prioidx map prior to checking to see if the index being set is out of
      bounds.  This patch corrects that, avoiding the possiblity of us writing beyond
      the end of the array
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Reported-by: NStanislaw Gruszka <sgruszka@redhat.com>
      CC: Stanislaw Gruszka <sgruszka@redhat.com>
      CC: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5962b35c