From patchwork Mon Mar 1 16:14:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 388668 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3542901jap; Mon, 1 Mar 2021 09:29:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzurjoWDQamoyircfVzSGLxl7Nzm+SmxW7zQ+Typq2E/+IYRW1yO4F267akiUMbdTxlg4iQ X-Received: by 2002:a05:6402:1c08:: with SMTP id ck8mr17272752edb.154.1614619776851; Mon, 01 Mar 2021 09:29:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614619776; cv=none; d=google.com; s=arc-20160816; b=sQTCpFhzdj0N26aHrZWrMJfe9QgoB+EzFPzfhqbzAJ84E3CH2d38L/NHLwBYw5UaVw sZKa3fayrEur/8DWXH+phANYiROAHw89Z4EHV81jnT7HdUlOTgc+4KsURVdblX2ikb5X H/69/DKu9QT5A3kb0N17WX0t/AiN+fuoJ7c643bNgBzqTP5amUCDWInNh8oTEyzDtEMO bu8NQ0pbaZtbjDoEgBCLHtWA97tFxVTCl1kPzZf/n9Dy8H/Ji/lXG8htmvXAFFqwkXac rHWgFpYJfhdNVoDzmnxmk0HrBPyPV4Z30C+D76QYxwxmteckGdte4qK+0iQgFV2fZdYH fAgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dhYa66fvJxUAv3rZWMPuqJDC2oYSBeHTK6R8QKxrnE0=; b=B/9Jq2AjMWF0HnpTwMuHbZk4KRinfXFGgRwQA6mx7ZpVNWtR/popFC2m7UWEFkPcN3 KxPymkHjZLO4r3hqUYpF7a7/xW6kuYKDGyry9m9mFc6VoO6Xl0zhSS0jzVYQqe+1BAHG hjuPo9Bod0otrVG/iSqzuf0o+IuIHUPFjmXVbz7MpFI7AlJz44ETn892WfcaOvezx0u8 WIQCYgwxNzz8pT4xd9KMBNK9qgSG4ol+vMIhGZtGmM/y/OKTYzk/nMpEQHjklMzapoQr yn8uQOe52x3jc+kwrJ8Cwkgg/JNWF8RAjI2qcXDyvdrrWtsOwhVUffmvy+Anetur9KKb sytg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PkZuVPtF; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si3206538ejg.288.2021.03.01.09.29.36; Mon, 01 Mar 2021 09:29:36 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PkZuVPtF; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238472AbhCAR2X (ORCPT + 13 others); Mon, 1 Mar 2021 12:28:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:37358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236972AbhCARSv (ORCPT ); Mon, 1 Mar 2021 12:18:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B232A64EEC; Mon, 1 Mar 2021 16:46:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614617214; bh=xmI+xH5TJI+0iWuL1ogIbW3fvfnqtxq3qULo2d1GKUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PkZuVPtFoQzFL3kRHi7TVlYMAtkgQ3ILGPA8KM1RzPjV/OBNX7H38wpQLDll8DOAN 0liEgy8c7a/HAIH65QF5SjNZCzDUl8IrbgUAfANPHwzP1Mxuxiqv2rwCZECDVaCGgm JNj7iYT9CH8F+9D8p5PqAd31HC+A4VaXbxPqeueU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Jason A. Donenfeld" , Nicolas Dichtel , Steffen Klassert , "David S. Miller" Subject: [PATCH 4.19 242/247] xfrm: interface: use icmp_ndo_send helper Date: Mon, 1 Mar 2021 17:14:22 +0100 Message-Id: <20210301161043.554355228@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jason A. Donenfeld commit 45942ba890e6f35232727a5fa33d732681f4eb9f upstream. Because xfrmi is calling icmp from network device context, it should use the ndo helper so that the rate limiting applies correctly. Signed-off-by: Jason A. Donenfeld Cc: Nicolas Dichtel Cc: Steffen Klassert Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/xfrm/xfrm_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/net/xfrm/xfrm_interface.c +++ b/net/xfrm/xfrm_interface.c @@ -300,10 +300,10 @@ xfrmi_xmit2(struct sk_buff *skb, struct if (mtu < IPV6_MIN_MTU) mtu = IPV6_MIN_MTU; - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); + icmpv6_ndo_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); } else { - icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, - htonl(mtu)); + icmp_ndo_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, + htonl(mtu)); } dst_release(dst);