Commit 2fe195cf authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

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: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93b3cff9
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment