From: Ido Schimmel Date: Thu, 29 Aug 2024 06:54:58 +0000 (+0300) Subject: vrf: Unmask upper DSCP bits in vrf_process_v4_outbound() X-Git-Tag: v6.12-rc1~232^2~133^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5d8ffe29cf2873b62e4bc008ca48d045b6cde88;p=thirdparty%2Fkernel%2Flinux.git vrf: Unmask upper DSCP bits in vrf_process_v4_outbound() Unmask the upper DSCP bits when calling ip_route_output_flow() so that in the future it could perform the FIB lookup according to the full DSCP value. Signed-off-by: Ido Schimmel Reviewed-by: Guillaume Nault Signed-off-by: David S. Miller --- diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 040f0bb36c0ea..a900908eb24a6 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -37,6 +37,7 @@ #include #include #include +#include #define DRV_NAME "vrf" #define DRV_VERSION "1.1" @@ -520,7 +521,7 @@ static netdev_tx_t vrf_process_v4_outbound(struct sk_buff *skb, /* needed to match OIF rule */ fl4.flowi4_l3mdev = vrf_dev->ifindex; fl4.flowi4_iif = LOOPBACK_IFINDEX; - fl4.flowi4_tos = RT_TOS(ip4h->tos); + fl4.flowi4_tos = ip4h->tos & INET_DSCP_MASK; fl4.flowi4_flags = FLOWI_FLAG_ANYSRC; fl4.flowi4_proto = ip4h->protocol; fl4.daddr = ip4h->daddr;