diff options
author | Eric Dumazet <edumazet@google.com> | 2019-07-01 06:39:36 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-01 10:54:51 -0700 |
commit | a346abe051bd2bd0d5d0140b2da9ec95639acad7 (patch) | |
tree | 1e03874ac049b3d298d382e678a84b68f7ce5f12 /net/ipv6/icmp.c | |
parent | 954a5a029472568845a25cd1c59e02e09db3316c (diff) | |
download | linux-a346abe051bd2bd0d5d0140b2da9ec95639acad7.tar.bz2 |
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>
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 12906301ec7b..62c997201970 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -703,6 +703,9 @@ static void icmpv6_echo_reply(struct sk_buff *skb) tmp_hdr.icmp6_type = ICMPV6_ECHO_REPLY; memset(&fl6, 0, sizeof(fl6)); + if (net->ipv6.sysctl.flowlabel_reflect & FLOWLABEL_REFLECT_ICMPV6_ECHO_REPLIES) + fl6.flowlabel = ip6_flowlabel(ipv6_hdr(skb)); + fl6.flowi6_proto = IPPROTO_ICMPV6; fl6.daddr = ipv6_hdr(skb)->saddr; if (saddr) |