1. 07 Mar, 2016 3 commits
    • Julian Anastasov's avatar
      ipvs: allow rescheduling after RST · f911b675
      Julian Anastasov authored
      "RFC 5961, 4.2. Mitigation" describes a mechanism to request
      client to confirm with RST the restart of TCP connection
      before resending its SYN. As result, IPVS can see SYNs for
      existing connection in CLOSE state. Add check to allow
      rescheduling in this state.
      Signed-off-by: default avatarJulian Anastasov <ja@ssi.bg>
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      f911b675
    • Julian Anastasov's avatar
      ipvs: drop first packet to redirect conntrack · f719e375
      Julian Anastasov authored
      Jiri Bohac is reporting for a problem where the attempt
      to reschedule existing connection to another real server
      needs proper redirect for the conntrack used by the IPVS
      connection. For example, when IPVS connection is created
      to NAT-ed real server we alter the reply direction of
      conntrack. If we later decide to select different real
      server we can not alter again the conntrack. And if we
      expire the old connection, the new connection is left
      without conntrack.
      
      So, the only way to redirect both the IPVS connection and
      the Netfilter's conntrack is to drop the SYN packet that
      hits existing connection, to wait for the next jiffie
      to expire the old connection and its conntrack and to rely
      on client's retransmission to create new connection as
      usually.
      
      Jiri Bohac provided a fix that drops all SYNs on rescheduling,
      I extended his patch to do such drops only for connections
      that use conntrack. Here is the original report from Jiri Bohac:
      
      Since commit dc7b3eb9 ("ipvs: Fix reuse connection if real server
      is dead"), new connections to dead servers are redistributed
      immediately to new servers.  The old connection is expired using
      ip_vs_conn_expire_now() which sets the connection timer to expire
      immediately.
      
      However, before the timer callback, ip_vs_conn_expire(), is run
      to clean the connection's conntrack entry, the new redistributed
      connection may already be established and its conntrack removed
      instead.
      
      Fix this by dropping the first packet of the new connection
      instead, like we do when the destination server is not available.
      The timer will have deleted the old conntrack entry long before
      the first packet of the new connection is retransmitted.
      
      Fixes: dc7b3eb9 ("ipvs: Fix reuse connection if real server is dead")
      Signed-off-by: default avatarJiri Bohac <jbohac@suse.cz>
      Signed-off-by: default avatarJulian Anastasov <ja@ssi.bg>
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      f719e375
    • Arnd Bergmann's avatar
      ipvs: handle ip_vs_fill_iph_skb_off failure · 3f20efba
      Arnd Bergmann authored
      ip_vs_fill_iph_skb_off() may not find an IP header, and gcc has
      determined that ip_vs_sip_fill_param() then incorrectly accesses
      the protocol fields:
      
      net/netfilter/ipvs/ip_vs_pe_sip.c: In function 'ip_vs_sip_fill_param':
      net/netfilter/ipvs/ip_vs_pe_sip.c:76:5: error: 'iph.protocol' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        if (iph.protocol != IPPROTO_UDP)
           ^
      net/netfilter/ipvs/ip_vs_pe_sip.c:81:10: error: 'iph.len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        dataoff = iph.len + sizeof(struct udphdr);
                ^
      
      This adds a check for the ip_vs_fill_iph_skb_off() return code
      before looking at the ip header data returned from it.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: b0e010c5 ("ipvs: replace ip_vs_fill_ip4hdr with ip_vs_fill_iph_skb_off")
      Acked-by: default avatarJulian Anastasov <ja@ssi.bg>
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      3f20efba
  2. 29 Feb, 2016 1 commit
  3. 26 Feb, 2016 1 commit
  4. 25 Feb, 2016 7 commits
  5. 24 Feb, 2016 6 commits
  6. 23 Feb, 2016 5 commits
  7. 22 Feb, 2016 17 commits