mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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:
parent
f9d4b0c1e9
commit
b16fb418b1
7 changed files with 63 additions and 22 deletions
|
@ -245,15 +245,18 @@ static const struct nla_policy fib6_rule_policy[FRA_MAX+1] = {
|
|||
|
||||
static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
|
||||
struct fib_rule_hdr *frh,
|
||||
struct nlattr **tb)
|
||||
struct nlattr **tb,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
int err = -EINVAL;
|
||||
struct net *net = sock_net(skb->sk);
|
||||
struct fib6_rule *rule6 = (struct fib6_rule *) rule;
|
||||
|
||||
if (rule->action == FR_ACT_TO_TBL && !rule->l3mdev) {
|
||||
if (rule->table == RT6_TABLE_UNSPEC)
|
||||
if (rule->table == RT6_TABLE_UNSPEC) {
|
||||
NL_SET_ERR_MSG(extack, "Invalid table");
|
||||
goto errout;
|
||||
}
|
||||
|
||||
if (fib6_new_table(net, rule->table) == NULL) {
|
||||
err = -ENOBUFS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue