From: Jason A. Donenfeld Date: Tue, 11 Feb 2020 19:47:06 +0000 (+0100) Subject: gtp: use icmp_ndo_send helper X-Git-Tag: v5.10.7~3219^2~6^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0fce6f945a26d4e953a147fe7ca11410322c9fe;p=platform%2Fkernel%2Flinux-rpi.git gtp: use icmp_ndo_send helper 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 --- diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index af07ea7..672cd2c 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -546,8 +546,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; }