mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
ipvs: do not propagate one-packet flag to synced conns
commita63d2dbaebupstream. Synced connections can be created before their destination exists. When the destination is later added, ip_vs_bind_dest() copies connection flags from the destination into cp->flags. IP_VS_CONN_F_ONE_PACKET connections are not synced. If a synced connection inherits IP_VS_CONN_F_ONE_PACKET while it is already hashed, expiry can treat it as a one-packet connection and skip unlinking the existing conn_tab node, leaving stale hash nodes pointing at a freed struct ip_vs_conn. Drop IP_VS_CONN_F_ONE_PACKET from destination flags when binding synced connections. Fixes:26ec037f98("IPVS: one-packet scheduling") Cc: stable@vger.kernel.org Reported-by: Yuan Tan <yuantan098@gmail.com> Reported-by: Yifan Wu <yifanwucs@gmail.com> Reported-by: Juefei Pu <tomapufckgml@gmail.com> Reported-by: Xin Liu <bird@lzu.edu.cn> Suggested-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Zhiling Zou <roxy520tt@gmail.com> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
31089f4eab
commit
44af98cc7d
@@ -598,6 +598,9 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
|
||||
flags = cp->flags;
|
||||
/* Bind with the destination and its corresponding transmitter */
|
||||
if (flags & IP_VS_CONN_F_SYNC) {
|
||||
/* Synced conns are hashed, so they can not get this flag */
|
||||
conn_flags &= ~IP_VS_CONN_F_ONE_PACKET;
|
||||
|
||||
/* if the connection is not template and is created
|
||||
* by sync, preserve the activity flag.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user