Files
linux/net/ipv6
Serhey Popovych b9ca9b0f55 ipv6: Do not leak throw route references
[ Upstream commit 07f615574f ]

While commit 73ba57bfae ("ipv6: fix backtracking for throw routes")
does good job on error propagation to the fib_rules_lookup()
in fib rules core framework that also corrects throw routes
handling, it does not solve route reference leakage problem
happened when we return -EAGAIN to the fib_rules_lookup()
and leave routing table entry referenced in arg->result.

If rule with matched throw route isn't last matched in the
list we overwrite arg->result losing reference on throw
route stored previously forever.

We also partially revert commit ab997ad408 ("ipv6: fix the
incorrect return value of throw route") since we never return
routing table entry with dst.error == -EAGAIN when
CONFIG_IPV6_MULTIPLE_TABLES is on. Also there is no point
to check for RTF_REJECT flag since it is always set throw
route.

Fixes: 73ba57bfae ("ipv6: fix backtracking for throw routes")
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-05 14:40:16 +02:00
..
2015-08-25 13:37:31 -07:00
2016-11-28 16:13:01 -05:00
2017-03-22 12:43:31 +01:00
2016-05-31 14:07:49 -07:00
2016-09-10 23:12:52 -07:00
2017-06-14 15:05:52 +02:00
2017-07-05 14:40:15 +02:00
2017-06-14 15:05:52 +02:00
2017-02-18 15:11:43 +01:00
2016-06-27 15:06:17 -04:00
2015-11-03 10:52:13 -05:00
2016-09-21 10:09:14 +02:00
2016-09-21 10:09:14 +02:00