Skip to content

Commit 45942ba

Browse files
zx2c4davem330
authored andcommitted
xfrm: interface: use icmp_ndo_send helper
Because xfrmi 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 <[email protected]> Cc: Nicolas Dichtel <[email protected]> Cc: Steffen Klassert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a12d7f3 commit 45942ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/xfrm/xfrm_interface.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,10 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)
300300
if (mtu < IPV6_MIN_MTU)
301301
mtu = IPV6_MIN_MTU;
302302

303-
icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
303+
icmpv6_ndo_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
304304
} else {
305-
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
306-
htonl(mtu));
305+
icmp_ndo_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
306+
htonl(mtu));
307307
}
308308

309309
dst_release(dst);

0 commit comments

Comments
 (0)