From patchwork Mon Mar 1 16:13:50 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: 388649 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3505362jap; Mon, 1 Mar 2021 08:45:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDOBwpTmHfBowIKRdXtJnSKojhTffXSTZtfRacOC8K9ynMoDo78v2UjspQ0a82nji+IjNh X-Received: by 2002:a17:906:3648:: with SMTP id r8mr139864ejb.58.1614617100379; Mon, 01 Mar 2021 08:45:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614617100; cv=none; d=google.com; s=arc-20160816; b=nNF0P6rerbzHpslFX3R1AhdkZe6ZMSGKrswVfTdMs3ILOU0CrTtV7qqU5+qVVsnfT5 hfgUZqi9XOcHdRVgnPDWrLOAXBsmPsoZtkCipxMnMSxmgEKYrILejkELtEyhKhU8XQt/ +D7QhM18shOMxQcMDe8WlDT4lEkhlB6/cdJhoqJCBGJBwMsHTlIspbbbIMsh0jmKYMeW KbrMMTwyzuEMxig4qLCH3bLWYdGcrXHVqYAwOib8bCeQI3Okk87sS9IxC8XfplukzgZ0 u6fdNpCTiHiVo3Ca7Mgf9jbbQCSwdBJOgCa/Nix6NYoB4Occ/8gVIpEDcQ8/TGWyheAR LckQ== 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=ITNqgpOtS0H9Np7kpxBKdaeBLoSLvMK5FGyKp31I4Is=; b=HZxGMg+TEiBHqLlhI9c5VnI5nU/43oVIZSkEPzAccLtO8yS4kWXFWdyvyQLe0Lmosy BxjHsrlsxqyXW48daWz7RGZHCNfr6YQVZWz/41Zl/YNlxdOp30Hinr7jc/JRC4ODOUOz SdAMBYJ0F1ooG9qw3LibnOraGwdpwV3LQk9vzHpDVS3MxXHM1PKgvcJFCxYiUu2Pv1GX dcwPZ6Ea0ZfFan8Eh4xoPSJw3qbHVkAmZzL6WQVym4pwcrzq9yLOTx24YJZ8ERMVGkk+ es6dsej2hG6l/yZLbVlmkEV42xSqbwZ0jBuscJmrKwLfniV/1P3WdaJPXbOQ/MnXnTwJ IPTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wtkpKUcb; 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 f7si12055634edd.14.2021.03.01.08.45.00; Mon, 01 Mar 2021 08:45:00 -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=wtkpKUcb; 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 S235257AbhCAQni (ORCPT + 13 others); Mon, 1 Mar 2021 11:43:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:43466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233023AbhCAQhH (ORCPT ); Mon, 1 Mar 2021 11:37:07 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BAD1664EAE; Mon, 1 Mar 2021 16:26:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614615987; bh=1UJIM5Q7m9CRmqAmkHg982t69I14t9vxTAJCAWmR4mw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wtkpKUcbSxVMw2PPSq44Qi7BFLUL0md2vrefkj4ahklRtH2uJuv66C/SXqYiu7EQG 7qDt9v+FOh0fq+qeXKdKEVaAprv54nshchuaJVOi4Whko9717Ds7DAw5d+rwVEOzfy c1FpofVBIxUfcdMvKKIK9DkmsXpSkBVIoMJj/A3E= 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 4.9 129/134] gtp: use icmp_ndo_send helper Date: Mon, 1 Mar 2021 17:13:50 +0100 Message-Id: <20210301161019.944129071@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161013.585393984@linuxfoundation.org> References: <20210301161013.585393984@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 @@ -560,8 +560,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; }