Skip to content

Commit 34e406a

Browse files
idoschkuba-moo
authored andcommitted
net: fib_rules: Enable port mask usage
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 <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Guillaume Nault <[email protected]> Reviewed-by: David Ahern <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent fc1266a commit 34e406a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/core/fib_rules.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,8 @@ static const struct nla_policy fib_rule_policy[FRA_MAX + 1] = {
843843
[FRA_DSCP] = NLA_POLICY_MAX(NLA_U8, INET_DSCP_MASK >> 2),
844844
[FRA_FLOWLABEL] = { .type = NLA_BE32 },
845845
[FRA_FLOWLABEL_MASK] = { .type = NLA_BE32 },
846-
[FRA_SPORT_MASK] = { .type = NLA_REJECT },
847-
[FRA_DPORT_MASK] = { .type = NLA_REJECT },
846+
[FRA_SPORT_MASK] = { .type = NLA_U16 },
847+
[FRA_DPORT_MASK] = { .type = NLA_U16 },
848848
};
849849

850850
int fib_newrule(struct net *net, struct sk_buff *skb, struct nlmsghdr *nlh,

0 commit comments

Comments
 (0)