ipv6: Reject routes configurations that specify dsfield (tos)
authorGuillaume Nault <gnault@redhat.com>
Thu, 10 Feb 2022 15:08:08 +0000 (16:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Feb 2022 11:18:59 +0000 (11:18 +0000)
commitb9605161e7be40fdd0fa0685b5c534e6201ac04b
treebb661f706cfb2ab9f36f12a0e72ff2e57578954d
parent12a8f37fd2d3eb5e6d1b2c50e9ed63dd60b43625
ipv6: Reject routes configurations that specify dsfield (tos)

The ->rtm_tos option is normally used to route packets based on both
the destination address and the DS field. However it's ignored for
IPv6 routes. Setting ->rtm_tos for IPv6 is thus invalid as the route
is going to work only on the destination address anyway, so it won't
behave as specified.

Suggested-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c
tools/testing/selftests/net/fib_tests.sh