Skip to content

Commit

Permalink
net: fib_rules: Enable port mask usage
Browse files Browse the repository at this point in the history
Allow user space to configure FIB rules that match on the source and
destination ports with a mask, now that support has been added to the
FIB rule core and the IPv4 and IPv6 address families.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250217134109.311176-6-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Ido Schimmel authored and Jakub Kicinski committed Feb 20, 2025
1 parent fc1266a commit 34e406a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/core/fib_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,8 @@ static const struct nla_policy fib_rule_policy[FRA_MAX + 1] = {
[FRA_DSCP] = NLA_POLICY_MAX(NLA_U8, INET_DSCP_MASK >> 2),
[FRA_FLOWLABEL] = { .type = NLA_BE32 },
[FRA_FLOWLABEL_MASK] = { .type = NLA_BE32 },
[FRA_SPORT_MASK] = { .type = NLA_REJECT },
[FRA_DPORT_MASK] = { .type = NLA_REJECT },
[FRA_SPORT_MASK] = { .type = NLA_U16 },
[FRA_DPORT_MASK] = { .type = NLA_U16 },
};

int fib_newrule(struct net *net, struct sk_buff *skb, struct nlmsghdr *nlh,
Expand Down

0 comments on commit 34e406a

Please sign in to comment.