From: Hannes Frederic Sowa Date: Thu, 1 Aug 2013 06:54:47 +0000 (+0200) Subject: ipv6: fib6_rules should return exact return value X-Git-Tag: v3.12-rc1~132^2~400 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46b3a421903aa2a4bc9731ca4663cee3ea869dab;p=pandora-kernel.git ipv6: fib6_rules should return exact return value With the addition of the suppress operation (7764a45a8f1fe74d4f7d301eaca2e558e7e2831a ("fib_rules: add .suppress operation") we rely on accurate error reporting of the fib_rules.actions. fib6_rule_action always returned -EAGAIN in case we could not find a matching route and 0 if a rule was matched. This also included a match for blackhole or prohibited rule actions which could get suppressed by the new logic. So adapt fib6_rule_action to always return the correct error code as its counterpart fib4_rule_action does. This also fixes a possiblity of nullptr-deref where we don't find a table, thus rt == NULL. Because the condition rt != ip6_null_entry still holdes it seems we could later get a nullptr bug on dereference rt->dst. v2: a) Fixed a brain fart in the commit msg (the rule => a table, etc). No changes to the patch. Cc: Stefan Tomanek Cc: Hideaki YOSHIFUJI Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller --- Reading git-diff-tree failed