]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Reject again rules with high DSCP values
authorGuillaume Nault <gnault@redhat.com>
Thu, 10 Feb 2022 12:24:51 +0000 (13:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Feb 2022 15:33:33 +0000 (15:33 +0000)
commita0e23180f5e673fb1953c70f6b6ab272e66cb607
tree3c97084ee5216f7e3306006e51f245411b4a25e3
parent343fe0fdf049069cd6a2fc716b83fc1bf6255dd0
ipv4: Reject again rules with high DSCP values

Commit 2f501200dbdc ("ipv4: Stop taking ECN bits into account in
fib4-rules") replaced the validation test on frh->tos. While the new
test is stricter for ECN bits, it doesn't detect the use of high order
DSCP bits. This would be fine if IPv4 could properly handle them. But
currently, most IPv4 lookups are done with the three high DSCP bits
masked. Therefore, using these bits doesn't lead to the expected
result.

Let's reject such configurations again, so that nobody starts to
use and make any assumption about how the stack handles the three high
order DSCP bits in fib4 rules.

Fixes: 2f501200dbdc ("ipv4: Stop taking ECN bits into account in fib4-rules")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_rules.c