Skip to content

Commit e0fce6f

Browse files
zx2c4davem330
authored andcommitted
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 <Jason@zx2c4.com> Cc: Harald Welte <laforge@gnumonks.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0b41713 commit e0fce6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/gtp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev,
546546
mtu < ntohs(iph->tot_len)) {
547547
netdev_dbg(dev, "packet too big, fragmentation needed\n");
548548
memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
549-
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
550-
htonl(mtu));
549+
icmp_ndo_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
550+
htonl(mtu));
551551
goto err_rt;
552552
}
553553

0 commit comments

Comments
 (0)