From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31A9FC04E53 for ; Wed, 15 May 2019 11:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0520B20881 for ; Wed, 15 May 2019 11:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919486; bh=DoZPRdLuGCEXvpSNItVCktSRQCA7iKQ44s4rmE4fBrU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=GV8PiBrQ0ODpwG/oDr41vxWqEsb2GBlfNuU4vE6T8g6/QCm7oHzP5rCPOChjg8ZU+ v3cVEl2gwcBUOlL5DaC33X+3H62FB1K3PnD7xPl4zLs9gUpRNw2HarlnZuskxobTnZ IrDTKJC5CbWtcZLyMj2prZDY0T5Vc/8CCUWT1Y44= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731865AbfEOLYp (ORCPT ); Wed, 15 May 2019 07:24:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:35328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731581AbfEOLYl (ORCPT ); Wed, 15 May 2019 07:24:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E8392089E; Wed, 15 May 2019 11:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919480; bh=DoZPRdLuGCEXvpSNItVCktSRQCA7iKQ44s4rmE4fBrU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AdX3jtSp1T4ZDNxrd/WtHUKID4iytRyphkKmN1ZxrJhoJ4CLfYIUXoLW61eNliwNY J8X5V3oa3jIF8XQe9ylxqiuYWdXX6uk4sXhqjzxkhUxifDHzh9MI4s0CuRADEypYiN B2oXn+tOLJ+su030pBzAZqN4giHWeNSh86eUZ+7U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julian Anastasov , Simon Horman , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 4.19 047/113] ipvs: do not schedule icmp errors from tunnels Date: Wed, 15 May 2019 12:55:38 +0200 Message-Id: <20190515090657.213016439@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090652.640988966@linuxfoundation.org> References: <20190515090652.640988966@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 0261ea1bd1eb0da5c0792a9119b8655cf33c80a3 ] We can receive ICMP errors from client or from tunneling real server. While the former can be scheduled to real server, the latter should not be scheduled, they are decapsulated only when existing connection is found. Fixes: 6044eeffafbe ("ipvs: attempt to schedule icmp packets") Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/netfilter/ipvs/ip_vs_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index 3f963ea222774..a42c1bc7c6982 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c @@ -1647,7 +1647,7 @@ ip_vs_in_icmp(struct netns_ipvs *ipvs, struct sk_buff *skb, int *related, if (!cp) { int v; - if (!sysctl_schedule_icmp(ipvs)) + if (ipip || !sysctl_schedule_icmp(ipvs)) return NF_ACCEPT; if (!ip_vs_try_to_schedule(ipvs, AF_INET, skb, pd, &v, &cp, &ciph)) -- 2.20.1