diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-01 19:59:37 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-01 19:59:37 -0700 |
commit | 2fe195cfe3e53c144d247b2768e37732e8eae4d8 (patch) | |
tree | 5184938031f0caaa11e6668ea9aa8a121ef682e1 /net | |
parent | 93b3cff9915322d6fa36bac0064714a7076230e4 (diff) | |
download | kernel_samsung_smdk4412-2fe195cfe3e53c144d247b2768e37732e8eae4d8.zip kernel_samsung_smdk4412-2fe195cfe3e53c144d247b2768e37732e8eae4d8.tar.gz kernel_samsung_smdk4412-2fe195cfe3e53c144d247b2768e37732e8eae4d8.tar.bz2 |
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')
-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 e3e9ab0..277a230 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; } |