Commit d1d761b3 authored by Ido Schimmel's avatar Ido Schimmel Committed by Paolo Abeni
Browse files

net: fib_rules: Add flow label selector attributes



Add new FIB rule attributes which will allow user space to match on the
IPv6 flow label with a mask. Temporarily set the type of the attributes
to 'NLA_REJECT' while support is being added in the IPv6 code.

Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Reviewed-by: default avatarGuillaume Nault <gnault@redhat.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 4fefbc66
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ enum {
	FRA_SPORT_RANGE, /* sport */
	FRA_DPORT_RANGE, /* dport */
	FRA_DSCP,	/* dscp */
	FRA_FLOWLABEL,	/* flowlabel */
	FRA_FLOWLABEL_MASK,	/* flowlabel mask */
	__FRA_MAX
};

+2 −0
Original line number Diff line number Diff line
@@ -770,6 +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 },
};

int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh,