net: fib_rules: fix l3mdev netlink attr processing

Fixes: b16fb418b1 ("net: fib_rules: add extack support")
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Roopa Prabhu 2018-04-23 20:08:41 -07:00 committed by David S. Miller
parent b300fcf883
commit 9c20b9372f
1 changed files with 2 additions and 0 deletions

View File

@ -541,8 +541,10 @@ static int fib_nl2rule(struct sk_buff *skb, struct nlmsghdr *nlh,
nlrule->l3mdev = nla_get_u8(tb[FRA_L3MDEV]);
if (nlrule->l3mdev != 1)
#endif
{
NL_SET_ERR_MSG(extack, "Invalid l3mdev");
goto errout_free;
}
}
nlrule->action = frh->action;