[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200209143143.151632-5-Jason@zx2c4.com>
Date: Sun, 9 Feb 2020 15:31:43 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Cc: "Jason A. Donenfeld" <Jason@...c4.com>,
Nicolas Dichtel <nicolas.dichtel@...nd.com>,
Steffen Klassert <steffen.klassert@...unet.com>
Subject: [PATCH net 5/5] 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 <Jason@...c4.com>
Cc: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc: Steffen Klassert <steffen.klassert@...unet.com>
---
net/xfrm/xfrm_interface.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index dc651a628dcf..3361e3ac5714 100644
--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -300,10 +300,10 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)
if (mtu < IPV6_MIN_MTU)
mtu = IPV6_MIN_MTU;
- icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
+ icmpv6_ndo_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
} else {
- icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
- htonl(mtu));
+ icmp_ndo_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
+ htonl(mtu));
}
dst_release(dst);
--
2.25.0
Powered by blists - more mailing lists