diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-02-11 22:47:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-04 11:39:58 +0300 |
commit | 7538ce3f76a6b7e2c6394ba015c74a59445b60d6 (patch) | |
tree | 71c6a0da33721d4c38da424dd2d68502162547df /drivers/net | |
parent | e1820f4376528503812dc078de7651f17e84f43b (diff) | |
download | linux-7538ce3f76a6b7e2c6394ba015c74a59445b60d6.tar.xz |
gtp: use icmp_ndo_send helper
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 <Jason@zx2c4.com>
Cc: Harald Welte <laforge@gnumonks.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/gtp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index bb9cd1262cc9..c31b15a5e0dd 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; } |