summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2024-08-21 15:52:47 +0300
committerJakub Kicinski <kuba@kernel.org>2024-08-22 16:59:57 -0700
commitdf9131c7fafdc0d4c85686f5c7711a4dd4f3ae60 (patch)
treef60643c3e228ecc8c9f65f605a20aa76a73f0f25 /net/ipv4
parent39d3628f7ceabd22385dcd6811ed4c353f7c859b (diff)
downloadlwn-df9131c7fafdc0d4c85686f5c7711a4dd4f3ae60.tar.gz
lwn-df9131c7fafdc0d4c85686f5c7711a4dd4f3ae60.zip
ipv4: Unmask upper DSCP bits in input route lookup
Unmask the upper DSCP bits in input route lookup so that in the future the lookup could be performed according to the full DSCP value. No functional changes intended since the upper DSCP bits are masked when comparing against the TOS selectors in FIB rules and routes. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Acked-by: Florian Westphal <fw@strlen.de> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/20240821125251.1571445-9-idosch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 9b6528b7b562..73bb61162445 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2470,7 +2470,7 @@ int ip_route_input_noref(struct sk_buff *skb, __be32 daddr, __be32 saddr,
struct fib_result res;
int err;
- tos &= IPTOS_RT_MASK;
+ tos &= INET_DSCP_MASK;
rcu_read_lock();
err = ip_route_input_rcu(skb, daddr, saddr, tos, dev, &res);
rcu_read_unlock();