mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
net: fib_rules: fix error code for unsupported families
The errno code returned must be negative. Fixes "RTNETLINK answers: Unknown error 18446744073709551519". Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
93b3cff991
commit
2fe195cfe3
@ -226,7 +226,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
|
||||
|
||||
ops = lookup_rules_ops(net, frh->family);
|
||||
if (ops == NULL) {
|
||||
err = EAFNOSUPPORT;
|
||||
err = -EAFNOSUPPORT;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
|
||||
|
||||
ops = lookup_rules_ops(net, frh->family);
|
||||
if (ops == NULL) {
|
||||
err = EAFNOSUPPORT;
|
||||
err = -EAFNOSUPPORT;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user