ipv6: icmp: allow flowlabel reflection in echo replies

Extend flowlabel_reflect bitmask to allow conditional
reflection of incoming flowlabels in echo replies.

Note this has precedence against auto flowlabels.

Add flowlabel_reflect enum to replace hard coded
values.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet
2019-07-01 06:39:36 -07:00
committed by David S. Miller
parent 954a5a0294
commit a346abe051
6 changed files with 17 additions and 5 deletions

View File

@ -301,6 +301,13 @@ struct ipv6_txoptions {
/* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */
};
/* flowlabel_reflect sysctl values */
enum flowlabel_reflect {
FLOWLABEL_REFLECT_ESTABLISHED = 1,
FLOWLABEL_REFLECT_TCP_RESET = 2,
FLOWLABEL_REFLECT_ICMPV6_ECHO_REPLIES = 4,
};
struct ip6_flowlabel {
struct ip6_flowlabel __rcu *next;
__be32 label;