Skip to content
  1. Jul 18, 2012
  2. Jul 17, 2012
    • Eric Dumazet's avatar
      ipv4: fix rcu splat · 5abf7f7e
      Eric Dumazet authored
      
      
      free_nh_exceptions() should use rcu_dereference_protected(..., 1)
      since its called after one RCU grace period.
      
      Also add some const-ification in recent code.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5abf7f7e
    • David S. Miller's avatar
      ipv4: Fix nexthop exception hash computation. · d3a25c98
      David S. Miller authored
      
      
      Need to mask it with (FNHE_HASH_SIZE - 1).
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3a25c98
    • David S. Miller's avatar
      ipv4: Add FIB nexthop exceptions. · 4895c771
      David S. Miller authored
      
      
      In a regime where we have subnetted route entries, we need a way to
      store persistent storage about destination specific learned values
      such as redirects and PMTU values.
      
      This is implemented here via nexthop exceptions.
      
      The initial implementation is a 2048 entry hash table with relaiming
      starting at chain length 5.  A more sophisticated scheme can be
      devised if that proves necessary.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4895c771
    • Eric Dumazet's avatar
      tcp: implement RFC 5961 4.2 · 0c24604b
      Eric Dumazet authored
      
      
      Implement the RFC 5691 mitigation against Blind
      Reset attack using SYN bit.
      
      Section 4.2 of RFC 5961 advises to send a Challenge ACK and drop
      incoming packet, instead of resetting the session.
      
      Add a new SNMP counter to count number of challenge acks sent
      in response to SYN packets.
      (netstat -s | grep TCPSYNChallenge)
      
      Remove obsolete TCPAbortOnSyn, since we no longer abort a TCP session
      because of a SYN flag.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Kiran Kumar Kella <kkiran@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0c24604b
    • David S. Miller's avatar
      net: Pass optional SKB and SK arguments to dst_ops->{update_pmtu,redirect}() · 6700c270
      David S. Miller authored
      
      
      This will be used so that we can compose a full flow key.
      
      Even though we have a route in this context, we need more.  In the
      future the routes will be without destination address, source address,
      etc. keying.  One ipv4 route will cover entire subnets, etc.
      
      In this environment we have to have a way to possess persistent storage
      for redirects and PMTU information.  This persistent storage will exist
      in the FIB tables, and that's why we'll need to be able to rebuild a
      full lookup flow key here.  Using that flow key will do a fib_lookup()
      and create/update the persistent entry.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6700c270
    • Eric Dumazet's avatar
      tcp: implement RFC 5961 3.2 · 282f23c6
      Eric Dumazet authored
      
      
      Implement the RFC 5691 mitigation against Blind
      Reset attack using RST bit.
      
      Idea is to validate incoming RST sequence,
      to match RCV.NXT value, instead of previouly accepted
      window : (RCV.NXT <= SEG.SEQ < RCV.NXT+RCV.WND)
      
      If sequence is in window but not an exact match, send
      a "challenge ACK", so that the other part can resend an
      RST with the appropriate sequence.
      
      Add a new sysctl, tcp_challenge_ack_limit, to limit
      number of challenge ACK sent per second.
      
      Add a new SNMP counter to count number of challenge acks sent.
      (netstat -s | grep TCPChallengeACK)
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Kiran Kumar Kella <kkiran@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      282f23c6
    • Andrey Vagin's avatar
      net: make sock diag per-namespace · 51d7cccf
      Andrey Vagin authored
      
      
      Before this patch sock_diag works for init_net only and dumps
      information about sockets from all namespaces.
      
      This patch expands sock_diag for all name-spaces.
      It creates a netlink kernel socket for each netns and filters
      data during dumping.
      
      v2: filter accoding with netns in all places
          remove an unused variable.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: James Morris <jmorris@namei.org>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      CC: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarAndrew Vagin <avagin@openvz.org>
      Acked-by: default avatarPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51d7cccf
    • Eric Dumazet's avatar
      tcp: add OFO snmp counters · a6df1ae9
      Eric Dumazet authored
      
      
      Add three SNMP TCP counters, to better track TCP behavior
      at global stage (netstat -s), when packets are received
      Out Of Order (OFO)
      
      TCPOFOQueue : Number of packets queued in OFO queue
      
      TCPOFODrop  : Number of packets meant to be queued in OFO
                    but dropped because socket rcvbuf limit hit.
      
      TCPOFOMerge : Number of packets in OFO that were merged with
                    other packets.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6df1ae9
  3. Jul 16, 2012
    • David S. Miller's avatar
      ipv4: Add helper inet_csk_update_pmtu(). · 80d0a69f
      David S. Miller authored
      
      
      This abstracts away the call to dst_ops->update_pmtu() so that we can
      transparently handle the fact that, in the future, the dst itself can
      be invalidated by the PMTU update (when we have non-host routes cached
      in sockets).
      
      So we try to rebuild the socket cached route after the method
      invocation if necessary.
      
      This isn't used by SCTP because it needs to cache dsts per-transport,
      and thus will need it's own local version of this helper.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      80d0a69f
  4. Jul 13, 2012
  5. Jul 12, 2012
  6. Jul 11, 2012
Loading