summaryrefslogtreecommitdiff
path: root/drivers/net/ipvlan
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2024-08-29 09:54:57 +0300
committerDavid S. Miller <davem@davemloft.net>2024-08-31 17:44:51 +0100
commit939cd1abf080c629552a9c5e6db4c0509d13e4c7 (patch)
tree9576548b3a1695b85fdcd4a6e46d4be8d05ebb4e /drivers/net/ipvlan
parent6a59526628ad6dadf389f45ddb3f75db44930897 (diff)
downloadlwn-939cd1abf080c629552a9c5e6db4c0509d13e4c7.tar.gz
lwn-939cd1abf080c629552a9c5e6db4c0509d13e4c7.zip
ipvlan: Unmask upper DSCP bits in ipvlan_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 <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipvlan')
-rw-r--r--drivers/net/ipvlan/ipvlan_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index fef4eff7753a..b1afcb8740de 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -2,6 +2,8 @@
/* Copyright (c) 2014 Mahesh Bandewar <maheshb@google.com>
*/
+#include <net/inet_dscp.h>
+
#include "ipvlan.h"
static u32 ipvlan_jhash_secret __read_mostly;
@@ -420,7 +422,7 @@ static noinline_for_stack int ipvlan_process_v4_outbound(struct sk_buff *skb)
int err, ret = NET_XMIT_DROP;
struct flowi4 fl4 = {
.flowi4_oif = dev->ifindex,
- .flowi4_tos = RT_TOS(ip4h->tos),
+ .flowi4_tos = ip4h->tos & INET_DSCP_MASK,
.flowi4_flags = FLOWI_FLAG_ANYSRC,
.flowi4_mark = skb->mark,
.daddr = ip4h->daddr,