Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17060ca4 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: 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: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Cc: Harald Welte <laforge@gnumonks.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d8d268ce)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I87cecb7368e63ad10a3a6a43d990797997019f92
parent 61e9311b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -546,7 +546,7 @@ 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,
		icmp_ndo_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
			      htonl(mtu));
		goto err_rt;
	}