aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/core/fib_rules.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2025-02-20 10:05:20 +0200
committerJakub Kicinski <kuba@kernel.org>2025-02-21 16:08:47 -0800
commitca4edd969a9483b1a1837056641019f62287063f (patch)
tree280f7ff8b0a0da5048ffcabbd3b987d17e7716ba /net/core/fib_rules.c
parentMerge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next (diff)
downloadwireguard-linux-ca4edd969a9483b1a1837056641019f62287063f.tar.xz
wireguard-linux-ca4edd969a9483b1a1837056641019f62287063f.zip
net: fib_rules: Add DSCP mask attribute
Add an attribute that allows matching on DSCP with a mask. Matching on DSCP with a mask is needed in deployments where users encode path information into certain bits of the DSCP field. Temporarily set the type of the attribute to 'NLA_REJECT' while support is being added. Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Link: https://patch.msgid.link/20250220080525.831924-2-idosch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--net/core/fib_rules.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 5ddd34cbe7f6..00e6fe79ecba 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -845,6 +845,7 @@ static const struct nla_policy fib_rule_policy[FRA_MAX + 1] = {
[FRA_FLOWLABEL_MASK] = { .type = NLA_BE32 },
[FRA_SPORT_MASK] = { .type = NLA_U16 },
[FRA_DPORT_MASK] = { .type = NLA_U16 },
+ [FRA_DSCP_MASK] = { .type = NLA_REJECT },
};
int fib_newrule(struct net *net, struct sk_buff *skb, struct nlmsghdr *nlh,