]> git.baikalelectronics.ru Git - kernel.git/commit
geneve: fix TOS inheriting for ipv4
authorMatthias May <matthias.may@westermo.com>
Fri, 5 Aug 2022 19:00:06 +0000 (21:00 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 10 Aug 2022 05:17:15 +0000 (22:17 -0700)
commit289f831ac5ee4c5d22c1c4745b1c6d5a2fa95f05
tree62ae6579dcfca3fa6a889353a56a1926410ef59a
parentd5ec9a4d58bcbc66d94e81c886cca033c9aebd33
geneve: fix TOS inheriting for ipv4

The current code retrieves the TOS field after the lookup
on the ipv4 routing table. The routing process currently
only allows routing based on the original 3 TOS bits, and
not on the full 6 DSCP bits.
As a result the retrieved TOS is cut to the 3 bits.
However for inheriting purposes the full 6 bits should be used.

Extract the full 6 bits before the route lookup and use
that instead of the cut off 3 TOS bits.

Fixes: 68455a17e7ef ("geneve: Add support to collect tunnel metadata.")
Signed-off-by: Matthias May <matthias.may@westermo.com>
Acked-by: Guillaume Nault <gnault@redhat.com>
Link: https://lore.kernel.org/r/20220805190006.8078-1-matthias.may@westermo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/geneve.c