Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net: Use helper macro RT_TOS() in __icmp_send()
@ 2020-08-24 11:44 Miaohe Lin
  2020-08-25  1:12 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Miaohe Lin @ 2020-08-24 11:44 UTC (permalink / raw)
  To: davem, kuznet, yoshfuji, kuba; +Cc: netdev, linux-kernel, linmiaohe

Use helper macro RT_TOS() to get tos in __icmp_send().

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 net/ipv4/icmp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index cf36f955bfe6..3b387dc3864f 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -690,9 +690,9 @@ void __icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info,
 		rcu_read_unlock();
 	}
 
-	tos = icmp_pointers[type].error ? ((iph->tos & IPTOS_TOS_MASK) |
+	tos = icmp_pointers[type].error ? (RT_TOS(iph->tos) |
 					   IPTOS_PREC_INTERNETCONTROL) :
-					  iph->tos;
+					   iph->tos;
 	mark = IP4_REPLY_MARK(net, skb_in->mark);
 
 	if (__ip_options_echo(net, &icmp_param.replyopts.opt.opt, skb_in, opt))
-- 
2.19.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: Use helper macro RT_TOS() in __icmp_send()
  2020-08-24 11:44 [PATCH] net: Use helper macro RT_TOS() in __icmp_send() Miaohe Lin
@ 2020-08-25  1:12 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-08-25  1:12 UTC (permalink / raw)
  To: linmiaohe; +Cc: kuznet, yoshfuji, kuba, netdev, linux-kernel

From: Miaohe Lin <linmiaohe@huawei.com>
Date: Mon, 24 Aug 2020 07:44:37 -0400

> Use helper macro RT_TOS() to get tos in __icmp_send().
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Applied to net-next, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-25  1:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 11:44 [PATCH] net: Use helper macro RT_TOS() in __icmp_send() Miaohe Lin
2020-08-25  1:12 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).