diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-02 06:59:37 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-02 06:59:37 +0400 |
commit | 2fe195cfe3e53c144d247b2768e37732e8eae4d8 (patch) | |
tree | 5184938031f0caaa11e6668ea9aa8a121ef682e1 /net/core | |
parent | 93b3cff9915322d6fa36bac0064714a7076230e4 (diff) | |
download | linux-2fe195cfe3e53c144d247b2768e37732e8eae4d8.tar.xz |
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>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/fib_rules.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index e3e9ab0f74e3..277a2302eb3a 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -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; } |