Skip to contentSkip to conversation

net: fib_rules: fix error code for unsupported families

PATCH Applied Patrick McHardy 2 participants 2 messages Jun 30, 2008 – Jul 2, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

commit 92cfe56bb3a0b93db12f84618660fdc0153523eb

Author: Patrick McHardy <[email protected]>
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".

net/core/fib_rules.c +2 -2
index e3e9ab0..277a230 100644
@@ -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;
 	}
 
maintainer Applied
#1 lore raw

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

Quoted 7 lines

net: fib_rules: fix error code for unsupported families

The errno code returned must be negative.

Fixes "RTNETLINK answers: Unknown error 18446744073709551519".

Applied to net-2.6, thanks!