Commit 2fe195cf authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

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: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93b3cff9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
	}