1. 26 6月, 2013 5 次提交
    • A
      ipvs: SH fallback and L4 hashing · eba3b5a7
      Alexander Frolkin 提交于
      By default the SH scheduler rejects connections that are hashed onto a
      realserver of weight 0.  This patch adds a flag to make SH choose a
      different realserver in this case, instead of rejecting the connection.
      
      The patch also adds a flag to make SH include the source port (TCP, UDP,
      SCTP) in the hash as well as the source address.  This basically allows
      for deterministic round-robin load balancing (i.e., where any director
      in a cluster of directors with identical config will send the same
      packet the same way).
      
      The flags are service flags (IP_VS_SVC_F_SCHED*) so that these options
      can be set per service.  They are set using a new option to ipvsadm.
      Signed-off-by: NAlexander Frolkin <avf@eldamar.org.uk>
      Acked-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      eba3b5a7
    • J
      ipvs: drop SCTP connections depending on state · acaac5d8
      Julian Anastasov 提交于
      Drop SCTP connections under load (dropentry context) depending
      on the protocol state, just like for TCP: INIT conns are
      dropped immediately, established are dropped randomly while
      connections in progress or shutdown are skipped.
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      acaac5d8
    • J
      ipvs: replace the SCTP state machine · 61e7c420
      Julian Anastasov 提交于
      Convert the SCTP state table, so that it is more readable.
      Change the states to be according to the diagram in RFC 2960
      and add more states suitable for middle box. Still, such
      change in states adds incompatibility if systems in sync
      setup include this change and others do not include it.
      
      With this change we also have proper transitions in INPUT-ONLY
      mode (DR/TUN) where we see packets only from client. Now
      we should not switch to 10-second CLOSED state at a time
      when we should stay in ESTABLISHED state.
      
      The short names for states are because we have 16-char space
      in ipvsadm and 11-char limit for the connection list format.
      It is a sequence of the TCP implementation where the longest
      state name is ESTABLISHED.
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      61e7c420
    • A
      ipvs: sloppy TCP and SCTP · c6c96c18
      Alexander Frolkin 提交于
      This adds support for sloppy TCP and SCTP modes to IPVS.
      
      When enabled (sysctls net.ipv4.vs.sloppy_tcp and
      net.ipv4.vs.sloppy_sctp), allows IPVS to create connection state on any
      packet, not just a TCP SYN (or SCTP INIT).
      
      This allows connections to fail over from one IPVS director to another
      mid-flight.
      Signed-off-by: NAlexander Frolkin <avf@eldamar.org.uk>
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      c6c96c18
    • J
      ipvs: provide iph to schedulers · bba54de5
      Julian Anastasov 提交于
      Before now the schedulers needed access only to IP
      addresses and it was easy to get them from skb by
      using ip_vs_fill_iph_addr_only.
      
      New changes for the SH scheduler will need the protocol
      and ports which is difficult to get from skb for the
      IPv6 case. As we have all the data in the iph structure,
      to avoid the same slow lookups provide the iph to schedulers.
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Acked-by: NHans Schillstrom <hans@schillstrom.com>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      bba54de5
  2. 21 6月, 2013 1 次提交
    • E
      netfilter: xt_socket: add XT_SOCKET_NOWILDCARD flag · 681f130f
      Eric Dumazet 提交于
      xt_socket module can be a nice replacement to conntrack module
      in some cases (SYN filtering for example)
      
      But it lacks the ability to match the 3rd packet of TCP
      handshake (ACK coming from the client).
      
      Add a XT_SOCKET_NOWILDCARD flag to disable the wildcard mechanism.
      
      The wildcard is the legacy socket match behavior, that ignores
      LISTEN sockets bound to INADDR_ANY (or ipv6 equivalent)
      
      iptables -I INPUT -p tcp --syn -j SYN_CHAIN
      iptables -I INPUT -m socket --nowildcard -j ACCEPT
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Jesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      681f130f
  3. 20 6月, 2013 34 次提交