linux-stable/net/ipv6
Serhey Popovych 07f615574f ipv6: Do not leak throw route references
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>
2017-06-20 15:34:02 -04:00
..
ila ila_xlat: add missing hash secret initialization 2017-06-08 15:36:56 -04:00
netfilter
addrconf.c ipv6: fix calling in6_ifa_hold incorrectly for dad work 2017-06-15 11:26:16 -04:00
addrconf_core.c
addrlabel.c
af_inet6.c
ah6.c
anycast.c
calipso.c net/ipv6: Fix CALIPSO causing GPF with datagram support 2017-06-06 15:18:20 -04:00
datagram.c
esp6.c
esp6_offload.c
exthdrs.c
exthdrs_core.c
exthdrs_offload.c
fib6_rules.c ipv6: Do not leak throw route references 2017-06-20 15:34:02 -04:00
fou6.c
icmp.c net: don't global ICMP rate limit packets originating from loopback 2017-06-14 15:33:58 -04:00
inet6_connection_sock.c
inet6_hashtables.c
ip6_checksum.c
ip6_fib.c ipv6: Do not leak throw route references 2017-06-20 15:34:02 -04:00
ip6_flowlabel.c
ip6_gre.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
ip6_icmp.c
ip6_input.c
ip6_offload.c ipv6: Fix leak in ipv6_gso_segment(). 2017-06-04 21:41:10 -04:00
ip6_offload.h
ip6_output.c
ip6_tunnel.c ip6_tunnel: Correct tos value in collect_md mode 2017-06-18 23:56:57 -04:00
ip6_udp_tunnel.c
ip6_vti.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
ip6mr.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
ipcomp6.c
ipv6_sockglue.c
Kconfig
Makefile
mcast.c
mcast_snoop.c
mip6.c
ndisc.c
netfilter.c
output_core.c
ping.c net: ping: do not abuse udp_poll() 2017-06-04 22:56:55 -04:00
proc.c proc: snmp6: Use correct type in memset 2017-06-12 09:53:14 -04:00
protocol.c
raw.c net: ping: do not abuse udp_poll() 2017-06-04 22:56:55 -04:00
reassembly.c
route.c net: ipv6: Release route when device is unregistering 2017-06-08 11:12:39 -04:00
seg6.c
seg6_hmac.c
seg6_iptunnel.c
sit.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
syncookies.c
sysctl_net_ipv6.c
tcp_ipv6.c
tcpv6_offload.c
tunnel6.c
udp.c
udp_impl.h
udp_offload.c
udplite.c
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() 2017-06-02 13:57:27 -04:00
xfrm6_mode_transport.c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() 2017-06-02 13:57:27 -04:00
xfrm6_mode_tunnel.c
xfrm6_output.c
xfrm6_policy.c
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c