]> git.baikalelectronics.ru Git - kernel.git/commit
ipvs: fix the connection sync failed in some cases
authorguodeqing <geffrey.guo@huawei.com>
Thu, 16 Jul 2020 08:12:08 +0000 (16:12 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 21 Jul 2020 23:21:34 +0000 (01:21 +0200)
commite6653fb41778436d24f85c011cb10c70b155fccf
tree26b904986060703f6c31bfd0538e24f222e3cd2c
parent32427caccef0241c9b868038f9a1c18a03c52bd4
ipvs: fix the connection sync failed in some cases

The sync_thread_backup only checks sk_receive_queue is empty or not,
there is a situation which cannot sync the connection entries when
sk_receive_queue is empty and sk_rmem_alloc is larger than sk_rcvbuf,
the sync packets are dropped in __udp_enqueue_schedule_skb, this is
because the packets in reader_queue is not read, so the rmem is
not reclaimed.

Here I add the check of whether the reader_queue of the udp sock is
empty or not to solve this problem.

Fixes: 0f95f4715e8e ("udp: use a separate rx queue for packet reception")
Reported-by: zhouxudong <zhouxudong8@huawei.com>
Signed-off-by: guodeqing <geffrey.guo@huawei.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipvs/ip_vs_sync.c