From patchwork Mon Mar 1 16:14:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 388665 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3539962jap; Mon, 1 Mar 2021 09:25:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDIp3z+dRxoPnbPAdrge9rn+a30OxehscKXCeJYrzEWh6OOs0Sj5ddEjfzOTvcDpP2p6PP X-Received: by 2002:aa7:c243:: with SMTP id y3mr17523016edo.122.1614619526121; Mon, 01 Mar 2021 09:25:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614619526; cv=none; d=google.com; s=arc-20160816; b=0XSV9esng9FS19V6nB+djW14fJmjk4q4ojyI3cIJGdX4YLbgFIvUQuq8oOP8Cvm8Ax alsX3oC2nPqiS6s7pvJlAX+zOWAWr/xUVDChapcsgBCy2q5JRA19gzthkirQQzsGXzrd c98rliYEAqRreT6jWpO+/M9oAXMgafzlCTkQjgpbTlVDl2fb9TJf3avMZdu12g9aMkYI XKR36sQlfWhxEWDeKkrDyAxMYwBC/tJcqtbx9gBxU3hsa9D8prO4ItT3plpHtllSHBt1 TYtinU+6WJRJRCr/ZI6wOLFmBXFMwTmYH4PFrhIww4qeiAVny3WlIm/jvKZO7/LmG2lV 29GA== 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=EcICfcfPwxH6B4+Bja7Qr18XhbsdAjazlSRmRF7LQ7o=; b=Juhm1yA0eLRNA2cMpqZEFDwDX6aBSegeUEU2PkA9O6iWrw32+ebUOlZzpWuIzQf/Xw k7xNNz5YvgArVbU7QEbUPXQDiNsZRyRCmHeuXMEyhDXeADkrXaFvvbF5ND46putprrSw AUN9vFqiSQtMHNvvtkJSy8bJj2G2ibOi7RJDqvPtt0LumOBzkZmrFfQUsocIXTfysFOl TVDdpYD4HEDgVE1x2fLTHlIiJDOh7zfXT2Igu6AbbUKgBroPBTcKSssUepIKHbZd3XdM BgkJpJnjJ+FR9lvLpORCWNerCg/X4/Ir6P9mhSHIwi84k6nn/2Zv0XgpE0tZlwojN7m3 oF5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bB2u7Zhs; 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 s28si3670250edw.110.2021.03.01.09.25.25; Mon, 01 Mar 2021 09:25:26 -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=bB2u7Zhs; 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 S238254AbhCARYB (ORCPT + 13 others); Mon, 1 Mar 2021 12:24:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:36726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238046AbhCARSc (ORCPT ); Mon, 1 Mar 2021 12:18:32 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F282664E75; Mon, 1 Mar 2021 16:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614617208; bh=qlN6aSjYOdN8CSB3OeHLQN8lVTjIVBG/rzVjxGpX/xw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bB2u7ZhssMs+cX1Sii6a0VTo18oEYTNYVlBvV+H5P3oJ/mKYhmieyg4sXWlQLY3sC X3SdFMEQ6xl0N5jS/JbLU+1/nPZY2AeO9x4ILK+uG4CgQnj8S5U26MybcsuzAeuRCV 3H22IHBsJ91OMG6JqkZOuQvgNdYFleZBA4VGaTyQ= 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.19 240/247] gtp: use icmp_ndo_send helper Date: Mon, 1 Mar 2021 17:14:20 +0100 Message-Id: <20210301161043.454714787@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 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 @@ -550,8 +550,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; }