net: fib_rules: fix error code for unsupported families
Subsystems (3)
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".
Signed-off-by Patrick McHardy <[email protected]>
net/core/fib_rules.c +2 -2
@@ -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; }
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 familiesThe errno code returned must be negative.
Fixes "RTNETLINK answers: Unknown error 18446744073709551519".
Signed-off-by Patrick McHardy <[email protected]>
Applied to net-2.6, thanks!