1. 15 3月, 2011 10 次提交
  2. 09 3月, 2011 1 次提交
  3. 08 3月, 2011 1 次提交
  4. 01 3月, 2011 1 次提交
    • P
      netfilter: nf_ct_tcp: fix out of sync scenario while in SYN_RECV · 8a80c79a
      Pablo Neira Ayuso 提交于
      This patch fixes the out of sync scenarios while in SYN_RECV state.
      
      Quoting Jozsef, what it happens if we are out of sync if the
      following:
      
      > > b. conntrack entry is outdated, new SYN received
      > >    - (b1) we ignore it but save the initialization data from it
      > >    - (b2) when the reply SYN/ACK receives and it matches the saved data,
      > >      we pick up the new connection
      This is what it should happen if we are in SYN_RECV state. Initially,
      the SYN packet hits b1, thus we save data from it. But the SYN/ACK
      packet is considered a retransmission given that we're in SYN_RECV
      state. Therefore, we never hit b2 and we don't get in sync. To fix
      this, we ignore SYN/ACK if we are in SYN_RECV. If the previous packet
      was a SYN, then we enter the ignore case that get us in sync.
      
      This patch helps a lot to conntrackd in stress scenarios (assumming a
      client that generates lots of small TCP connections). During the failover,
      consider that the new primary has injected one outdated flow in SYN_RECV
      state (this is likely to happen if the conntrack event rate is high
      because the backup will be a bit delayed from the primary). With the
      current code, if the client starts a new fresh connection that matches
      the tuple, the SYN packet will be ignored without updating the state
      tracking, and the SYN+ACK in reply will blocked as it will not pass
      checkings III or IV (since all state tracking in the original direction
      is not initialized because of the SYN packet was ignored and the ignore
      case that get us in sync is not applied).
      
      I posted a couple of patches before this one. Changli Gao spotted
      a simpler way to fix this problem. This patch implements his idea.
      
      Cc: Changli Gao <xiaosuo@gmail.com>
      Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      8a80c79a
  5. 25 2月, 2011 1 次提交
  6. 24 2月, 2011 1 次提交
  7. 22 2月, 2011 1 次提交
  8. 16 2月, 2011 4 次提交
  9. 15 2月, 2011 1 次提交
  10. 14 2月, 2011 2 次提交
  11. 12 2月, 2011 1 次提交
    • S
      netfilter: xt_connlimit: connlimit-above early loop termination · 44bd4de9
      Stefan Berger 提交于
      The patch below introduces an early termination of the loop that is
      counting matches. It terminates once the counter has exceeded the
      threshold provided by the user. There's no point in continuing the loop
      afterwards and looking at other entries.
      
      It plays together with the following code further below:
      
      return (connections > info->limit) ^ info->inverse;
      
      where connections is the result of the counted connection, which in turn
      is the matches variable in the loop. So once
      
              -> matches = info->limit + 1
      alias   -> matches > info->limit
      alias   -> matches > threshold
      
      we can terminate the loop.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      44bd4de9
  12. 10 2月, 2011 1 次提交
  13. 07 2月, 2011 1 次提交
  14. 03 2月, 2011 4 次提交
  15. 02 2月, 2011 8 次提交
  16. 01 2月, 2011 2 次提交