]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: fib_rules: Enable flow label selector usage
authorIdo Schimmel <idosch@nvidia.com>
Mon, 16 Dec 2024 17:11:56 +0000 (19:11 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 19 Dec 2024 15:02:22 +0000 (16:02 +0100)
Now that both IPv4 and IPv6 correctly handle the new flow label
attributes, enable user space to configure FIB rules that make use of
the flow label by changing the policy to stop rejecting them and
accepting 32 bit values in big-endian byte order.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/core/fib_rules.c

index 153b14aade42e1ca60011d09ab9854e9b5f4fd36..e684ba3ebb38563abefc034c16ba381635285953 100644 (file)
@@ -770,8 +770,8 @@ static const struct nla_policy fib_rule_policy[FRA_MAX + 1] = {
        [FRA_SPORT_RANGE] = { .len = sizeof(struct fib_rule_port_range) },
        [FRA_DPORT_RANGE] = { .len = sizeof(struct fib_rule_port_range) },
        [FRA_DSCP]      = NLA_POLICY_MAX(NLA_U8, INET_DSCP_MASK >> 2),
-       [FRA_FLOWLABEL] = { .type = NLA_REJECT },
-       [FRA_FLOWLABEL_MASK] = { .type = NLA_REJECT },
+       [FRA_FLOWLABEL] = { .type = NLA_BE32 },
+       [FRA_FLOWLABEL_MASK] = { .type = NLA_BE32 },
 };
 
 int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh,