Subject: net: fib_rules: fix error code for unsupported families

From: Patrick McHardy <[email-masked]>
Date: Mon, 30 Jun 2008 22:21:50 +0200

commit 92cfe56bb3a0b93db12f84618660fdc0153523eb
Author: Patrick McHardy <[email-masked]>
Date:   Mon Jun 30 22:19:48 2008 +0200

    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 <[email-masked]>

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;
 	}