Skip to content

Commit 9d56bae

Browse files
zx2c4ksacilotto
authored andcommitted
xfrm: interface: use icmp_ndo_send helper
BugLink: https://bugs.launchpad.net/bugs/1918974 commit 45942ba upstream. 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 <Jason@zx2c4.com> Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com> Cc: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
1 parent e6b367e commit 9d56bae

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)