From patchwork Mon Mar 1 16:14:36 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: 388721 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3636152jap; Mon, 1 Mar 2021 11:36:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJybZZb0mso4rphjNk7TRpyqtrABcSzsCaV6WRWLhLGXGEtC94D2FMoRVanfcnLIN7GeP1g8 X-Received: by 2002:aa7:c84b:: with SMTP id g11mr17728684edt.169.1614627385556; Mon, 01 Mar 2021 11:36:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614627385; cv=none; d=google.com; s=arc-20160816; b=G+qqtgZtGXG+rpKiwPOqwdF+9b0k6rwQ2WREOEdOhneeGSYszVkUHAYGQ090ckRbDV 05BiMlQKd279viDHkt5Daw6T7I37SydFN6NlpeTGxnvNmF6wbxJS+5Env9P2rRbV5N/S UyFnvrqplqzhHKn7GjluAFt6CzkudrYA4kl14Zv6z7BXmqB+TrG7DU2okdJcdMbnUdYc FIAwmwrVmwpqpZQfx0v1TIOTLaLjWjm8PV4Z3VqgZDSsamOKQJ3wNM8n7Ebf4X7AERGT OrYJ5zUFhqdgWE1H76Jer9pwkdl+SeJZAwhBCoCB622+kpDwtJI3ZJ/VFSjUfepHlwB+ ngfw== 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=Gf2iapfup+/KSYc6N/MZBg6+tZOE9c0zqsCpENf0g28=; b=Iynmi+ch2wBMHEbF3XdYCJ971lRcnvPU9ODVIIcPiCwAKb8qLzUMuSjqD+37Xe9KT7 1rYMmnMiXz5KPwR2sMV5gcof8d5j+tZtmkB3IXKOGVdD4t9ugMHRNqShbDubgWMo5IYg tCf2ExY04v2sKjPzGkDT1FEnqoZU2P3or7U12/yPJ6UxN7rJuASaBRoHGfzXCNWL+UCe KIJ/eeh1ed7RJr8OFG13bhVcYcEW5XHUNglF666e2YD+zqpYKi0+OusEZemW8iFy6dfb cQntWNWp527p2Q/aIuYh4XWD2FeaXsyW7uyPWvZ5tKoustmIzZfUqMLXr+C+AREYm5w1 W7nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wpGHt115; 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 a2si13512896eda.350.2021.03.01.11.36.25; Mon, 01 Mar 2021 11:36:25 -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=wpGHt115; 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 S241924AbhCATdj (ORCPT + 13 others); Mon, 1 Mar 2021 14:33:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:48800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241568AbhCAT1B (ORCPT ); Mon, 1 Mar 2021 14:27:01 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 45CFD6512C; Mon, 1 Mar 2021 17:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614618214; bh=e4JZdb3fl5VVpZUqoLdtd7eDM1bvXmbGKuUuvrQIfpc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wpGHt115zmOINs9Yqun4+PJsJp25zD0h+Ri777M/ReSUEws7/rMMmlcsSn1s5conb UuWMqj2iahwrVgs4d3CnduGORMeMj9mKRhuPTvmMMEoSgFfkYgfr3d7KCeXBKRfgH/ hEEn3ZOA6/Bhu7Nj/x4VAajgh9nC21qWHcXp1hPA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Jason A. Donenfeld" , Harald Welte , "David S. Miller" Subject: [PATCH 5.4 332/340] gtp: use icmp_ndo_send helper Date: Mon, 1 Mar 2021 17:14:36 +0100 Message-Id: <20210301161104.638015236@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 e0fce6f945a26d4e953a147fe7ca11410322c9fe upstream. Because gtp 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: Harald Welte Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/gtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -546,8 +546,8 @@ static int gtp_build_skb_ip4(struct sk_b mtu < ntohs(iph->tot_len)) { netdev_dbg(dev, "packet too big, fragmentation needed\n"); memset(IPCB(skb), 0, sizeof(*IPCB(skb))); - icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, - htonl(mtu)); + icmp_ndo_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, + htonl(mtu)); goto err_rt; }