Skip to content

Commit

Permalink
net: Use helper macro RT_TOS() in __icmp_send()
Browse files Browse the repository at this point in the history
Use helper macro RT_TOS() to get tos in __icmp_send().

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Miaohe Lin authored and David S. Miller committed Aug 25, 2020
1 parent 7551144 commit 373c15c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 373c15c

Please sign in to comment.