From patchwork Mon Mar 1 16:14:38 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: 388730 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3651573jap; Mon, 1 Mar 2021 12:00:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEJGzKAg1TNYKDKRAhLRRmmc8PU/CSjGr71i4Ezoura49cFKCRjtsTKy+LXZhV79wRflxS X-Received: by 2002:a17:906:b102:: with SMTP id u2mr17626171ejy.303.1614628852288; Mon, 01 Mar 2021 12:00:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614628852; cv=none; d=google.com; s=arc-20160816; b=jV9lehlCjmkg4y4FJYG7z9xBfKVi7436V7UB2Iwd1dzcAkODd46agvhcwAlmslAeQc GJVsoIV2avT7uFf9JfrUPEnETg+/LWF1DY48nEoFG/Z8UycyoLGrPzcO7ZsVbm/D59iO JuKG4K7BRRT67C6ngiYBN1Uqvy/Lt7qJRSCDwCn0ZJob5mqCiNeStMwjPdCMQsBE5Tho zPuaRpkva7w9dweNBK+EbBiRpgHjxUu8m3F1dk8Gb5ytvh2DELhXI/ddzOBcGSaPUn03 0V4cl80VROHnN0Z1I0tP6LdmdWX4PDJU9qpqr31F7VFkC5b5eXMLkPrwSU78eaaDtjZM ynug== 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=yPo8GfsMUa++ZUnferC03zuk1pTMtYpHcCriRRGLtpvcv40qESEfoyfvVDKda9bs/B FKE3YJ5acTh/WCALhXkJ39zvLr8vmXrMr5MNn1svHQ0ek65abKfu30A+TZx709ohXy71 rOpJOcS2a6wDGzaXwMm1pmXLk4fUQG+GzKKEJjiCg/eggBRG8MXtBK+mVBsUpqsZ16p1 4A4Ez1/EdclGC576Drq2thn7TD51llFqSl/8t2w2++KyeeANZJ8YE4dUc3IrqyWAsT0d hvAbYC6QuuoWd2jFGxAOcUcN7GSxCem5VfSNtQjzVYJUiX0fsOmlgkIdEY+dAgHZDs47 V/1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="yB/x0zQ6"; 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 la25si5144716ejb.703.2021.03.01.12.00.52; Mon, 01 Mar 2021 12:00:52 -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="yB/x0zQ6"; 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 S242571AbhCAT6q (ORCPT + 13 others); Mon, 1 Mar 2021 14:58:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:55162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240364AbhCATqi (ORCPT ); Mon, 1 Mar 2021 14:46:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 74D8765120; Mon, 1 Mar 2021 17:02:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614618176; bh=xmI+xH5TJI+0iWuL1ogIbW3fvfnqtxq3qULo2d1GKUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yB/x0zQ6f/CH9OXZg/38u1YucfTiFfItVxRMxKxCyQZTBQxb3DGFZlgeHuBtxdhrc x1FlBu+Bu/BZlk4UPWiIBI8Fqx6U6hrgW+SjKhDfJV2PbSk0TWO9OpAcuyw6EEeLXk v9h8JTjBsw2Li53rt9vjB9O1/FURl/Jz+XhGWwyg= 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 5.4 334/340] xfrm: interface: use icmp_ndo_send helper Date: Mon, 1 Mar 2021 17:14:38 +0100 Message-Id: <20210301161104.731520824@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161048.294656001@linuxfoundation.org> References: <20210301161048.294656001@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);