Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3572300pxb; Mon, 1 Mar 2021 13:45:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKlN0m8n2Ryz4GIxvT4qQWltdQ7SAJqegDd9LghtDcvDCjQqOGluxBeLmy4zXVqexCXucR X-Received: by 2002:a50:d753:: with SMTP id i19mr17516143edj.43.1614635140552; Mon, 01 Mar 2021 13:45:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614635140; cv=none; d=google.com; s=arc-20160816; b=kvOt+eprqUmAvEQ2oHsoWht756TZkaZorXJ6mdWoNMK+jVSzHFqfUccMULWaSDb5tF vQqwGK2rcFkTOoo/X8qULMmGBRnoLRxFc5q+jsCmLeEc1GjBGTVkg6EUhxCJUoMtLSVf PKl9C7fqAZv1CvQ24AxJmJN15kErVLZp29DNW5Bn8yNGoHS/4Ybo89Cny2iHU7vg+Jt6 6MtJUXRXmVWH8m0msg+pE/mN7yHmePgrtv3TTcBKRepf5E4Yhm0cVpIgWJKO5hgGfa1+ /ZB3vQpNJy8EjtRGLC0rK2nXLKCuxLL74M+hQMGLQ7TGJxyR3MyOWCT4V4CipDIyJbSD eE1g== 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=Vrza+fnPLIbV3LsqX/or9Sqc1F48zAqhfGF1e1jle8w/OIT66/duOjgZhIfNrRLuw6 3T4DUJ9Gs/r+BZZVuBU4+Urk1uTAmbHCa1+dzgo+rBfaOVTtUG7Ma/WR/onNXsBY4Fd3 PZPKJC3li7MvpJkUU+efGDOx/nn7XA7WzuqrKTmdQKrGdetf6tYwvLya2Y2raOnHJ/tS gJmy7HYNSRgP+FLot0qzyeyqBS/QZoyTcTb76PUH2vuVcJRdvAI135Gt2/U1GaVNlRlL nebdtC7Ga2n3BiOcJFWWw2Abtq9XXWTxjMBREZFlxWe4G+JpTBoGAhAw3j1cIsvC5KMp nXSQ== 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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 j19si9378729ejs.516.2021.03.01.13.45.18; Mon, 01 Mar 2021 13:45:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S244116AbhCAVnF (ORCPT + 99 others); Mon, 1 Mar 2021 16:43:05 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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);