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

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) ...@@ -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); ops = lookup_rules_ops(net, frh->family);
if (ops == NULL) { if (ops == NULL) {
err = EAFNOSUPPORT; err = -EAFNOSUPPORT;
goto errout; goto errout;
} }
...@@ -365,7 +365,7 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) ...@@ -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); ops = lookup_rules_ops(net, frh->family);
if (ops == NULL) { if (ops == NULL) {
err = EAFNOSUPPORT; err = -EAFNOSUPPORT;
goto errout; goto errout;
} }
......
Markdown is supported
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