Commit 53a06ca9 authored by Matthias May's avatar Matthias May Committed by Zheng Zengkai
Browse files

geneve: fix TOS inheriting for ipv4

stable inclusion
from stable-v5.10.138
commit 2c746ec91de76e095e4f18367dbb5103a6ed09e1
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60QFD

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2c746ec91de76e095e4f18367dbb5103a6ed09e1



--------------------------------

commit b4ab94d6 upstream.

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: e305ac6c ("geneve: Add support to collect tunnel metadata.")
Signed-off-by: default avatarMatthias May <matthias.may@westermo.com>
Acked-by: default avatarGuillaume Nault <gnault@redhat.com>
Link: https://lore.kernel.org/r/20220805190006.8078-1-matthias.may@westermo.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 4f35010b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment