[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200209143143.151632-3-Jason@zx2c4.com>
Date: Sun, 9 Feb 2020 15:31:41 +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>,
Shannon Nelson <shannon.nelson@...cle.com>
Subject: [PATCH net 3/5] sunvnet: use icmp_ndo_send helper
Because sunvnet 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: Shannon Nelson <shannon.nelson@...cle.com>
---
drivers/net/ethernet/sun/sunvnet_common.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/sun/sunvnet_common.c b/drivers/net/ethernet/sun/sunvnet_common.c
index c23ce838ff63..9948c00fe625 100644
--- a/drivers/net/ethernet/sun/sunvnet_common.c
+++ b/drivers/net/ethernet/sun/sunvnet_common.c
@@ -1363,14 +1363,14 @@ sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,
rt = ip_route_output_key(dev_net(dev), &fl4);
if (!IS_ERR(rt)) {
skb_dst_set(skb, &rt->dst);
- icmp_send(skb, ICMP_DEST_UNREACH,
- ICMP_FRAG_NEEDED,
- htonl(localmtu));
+ icmp_ndo_send(skb, ICMP_DEST_UNREACH,
+ ICMP_FRAG_NEEDED,
+ htonl(localmtu));
}
}
#if IS_ENABLED(CONFIG_IPV6)
else if (skb->protocol == htons(ETH_P_IPV6))
- icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, localmtu);
+ icmpv6_ndo_send(skb, ICMPV6_PKT_TOOBIG, 0, localmtu);
#endif
goto out_dropped;
}
--
2.25.0
Powered by blists - more mailing lists