Skip to content

Commit

Permalink
net: fib_rules: fix error code for unsupported families
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jul 2, 2008
1 parent 93b3cff commit 2fe195c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/core/fib_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 2fe195c

Please sign in to comment.