From e1690dcb85eba8b046618ab25cf0117f39a1ce8c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 14 Apr 2021 11:57:52 +0800 Subject: [PATCH] gtp: use icmp_ndo_send helper stable inclusion from linux-4.19.178 commit 7538ce3f76a6b7e2c6394ba015c74a59445b60d6 -------------------------------- 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 Signed-off-by: Yang Yingliang Signed-off-by: Cheng Jian --- drivers/net/gtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 6571cac6e786..5804ac5b8f52 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -550,8 +550,8 @@ static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev, 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; } -- GitLab