Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2497397imm; Mon, 24 Sep 2018 05:29:24 -0700 (PDT) X-Google-Smtp-Source: ACcGV63rUEiwm7nGnNc68zjMuPP1iGTG2hLpHqnJQNBraji7x+Vvq7q+j72kf15sWqFFPkxq/Dti X-Received: by 2002:a17:902:a5c5:: with SMTP id t5-v6mr10417025plq.6.1537792164270; Mon, 24 Sep 2018 05:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792164; cv=none; d=google.com; s=arc-20160816; b=F6FVhcKzzniQcpg3aHwM5DL3Z560ubSG3+jyN5lRJ9TlehDdi0TqI7H/FeGzKbD99P NPOrnKP9XGFMm+qade8c0llSM6e/6TaJDbZPymEX0qkcu66PHeW6jWmaHqut0Cq8IjeF 8J0q7rGTLJY911ZCq6jtjMn1B3uX2lkCZL0ta+Bk8EEk/TM6gLUEvMIIuu+LsjK+SVrV NqGeqqeXO00EBPZw8yggw/Hxf9O6PS4SUbKwJ9oLoqiVuSqKr0ocIzlVdxKhKwHgx9B4 mctI5UQZqxl+cFEuHd3voBz/AOkhJzuagNvT12CFMB04XQDEmlofm1u9T7pGAwO4kvFY LQpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=0vMq03FlTjI8H76ngwTcXY8L362Nn3PJzZEVMmFqxAw=; b=mEMkLvB9YhVlkLWxVWcotZZoaevJBmZiQUCERHMWHIu+4Yxe6HyXsIytcijdrYRb5b shBCErw7598gTOtcnJKN5MoDjHH1uR6ve2skApsHUBmCgrmCaOEjKQgFD9eI8gFWlKST Ep/PnZRu69idl4JTb/4ttkWZfv0jOQU4h7gUsIDSYOkTUV0YjLPPLWhDfDdsUxNzDKZx 5tkCw4j4iN+dljDN5ZlzORtvYmjXRCYepfa3qvai+rA6RVMbHUxh796HDR//gycO/+ZM rpRjTTty61JB3iLNqfmlyWYimSRu+0Mmw/AF1wMTWhgU3AVyNYcvdmXUdC76S7PeOf40 ZqtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v127-v6si32807125pgv.89.2018.09.24.05.29.08; Mon, 24 Sep 2018 05:29:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733166AbeIXS2x (ORCPT + 99 others); Mon, 24 Sep 2018 14:28:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57202 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732223AbeIXS2w (ORCPT ); Mon, 24 Sep 2018 14:28:52 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8617E108B; Mon, 24 Sep 2018 12:26:58 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, William Tu , Haishuang Yan , "David S. Miller" Subject: [PATCH 4.18 011/235] erspan: return PACKET_REJECT when the appropriate tunnel is not found Date: Mon, 24 Sep 2018 13:49:57 +0200 Message-Id: <20180924113105.486122435@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Haishuang Yan [ Upstream commit 5a64506b5c2c3cdb29d817723205330378075448 ] If erspan tunnel hasn't been established, we'd better send icmp port unreachable message after receive erspan packets. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Cc: William Tu Signed-off-by: Haishuang Yan Acked-by: William Tu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/ip_gre.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -331,6 +331,8 @@ static int erspan_rcv(struct sk_buff *sk ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error); return PACKET_RCVD; } + return PACKET_REJECT; + drop: kfree_skb(skb); return PACKET_RCVD;