linux/net/ipv6
Martin KaFai Lau 0a1f596200 ipv6: Initialize rt6_info properly in ip6_blackhole_route()
ip6_blackhole_route() does not initialize the newly allocated
rt6_info properly.  This patch:
1. Call rt6_info_init() to initialize rt6i_siblings and rt6i_uncached

2. The current rt->dst._metrics init code is incorrect:
   - 'rt->dst._metrics = ort->dst._metris' is not always safe
   - Not sure what dst_copy_metrics() is trying to do here
     considering ip6_rt_blackhole_cow_metrics() always returns
     NULL

   Fix:
   - Always do dst_copy_metrics()
   - Replace ip6_rt_blackhole_cow_metrics() with
     dst_cow_metrics_generic()

3. Mask out the RTF_PCPU bit from the newly allocated blackhole route.
   This bug triggers an oops (reported by Phil Sutter) in rt6_get_cookie().
   It is because RTF_PCPU is set while rt->dst.from is NULL.

Fixes: d52d3997f8 ("ipv6: Create percpu rt6_info")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Reported-by: Phil Sutter <phil@nwl.cc>
Tested-by: Phil Sutter <phil@nwl.cc>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Julian Anastasov <ja@ssi.bg>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-16 00:39:16 -07:00
..
netfilter netfilter: nf_dup{4, 6}: fix build error when nf_conntrack disabled 2015-09-02 16:28:06 -07:00
addrconf_core.c
addrconf.c ipv6: gre: setup default multicast routes over PtP links 2015-10-11 05:30:43 -07:00
addrlabel.c
af_inet6.c
ah6.c ah6: fix error return code 2015-08-25 13:37:31 -07:00
anycast.c
datagram.c
esp6.c
exthdrs_core.c
exthdrs_offload.c ipv6: fix exthdrs offload registration in out_rt path 2015-09-02 15:31:00 -07:00
exthdrs.c
fib6_rules.c net: ipv6: use common fib_default_rule_pref 2015-09-09 14:19:50 -07:00
icmp.c
ila.c ila: Precompute checksum difference for translations 2015-08-24 10:34:40 -07:00
inet6_connection_sock.c
inet6_hashtables.c
ip6_checksum.c
ip6_fib.c ipv6: include NLM_F_REPLACE in route replace notifications 2015-09-17 15:00:27 -07:00
ip6_flowlabel.c
ip6_gre.c ip6_gre: Reduce log level in ip6gre_err() to debug 2015-09-24 15:28:43 -07:00
ip6_icmp.c
ip6_input.c
ip6_offload.c
ip6_offload.h
ip6_output.c ipv6: drop frames with attached skb->sk in forwarding 2015-10-11 05:30:44 -07:00
ip6_tunnel.c ip6_tunnel: Reduce log level in ip6_tnl_err() to debug 2015-09-24 16:08:37 -07:00
ip6_udp_tunnel.c vxlan: do not receive IPv4 packets on IPv6 socket 2015-08-29 13:07:54 -07:00
ip6_vti.c
ip6mr.c net: ipv6: use common fib_default_rule_pref 2015-09-09 14:19:50 -07:00
ipcomp6.c
ipv6_sockglue.c
Kconfig net: Identifier Locator Addressing module 2015-08-17 21:33:06 -07:00
Makefile net: Identifier Locator Addressing module 2015-08-17 21:33:06 -07:00
mcast_snoop.c net: fix wrong skb_get() usage / crash in IGMP/MLD parsing code 2015-08-13 17:08:39 -07:00
mcast.c
mip6.c
ndisc.c ipv6: send only one NEWLINK when RA causes changes 2015-08-31 21:20:29 -07:00
netfilter.c
output_core.c
ping.c
proc.c
protocol.c
raw.c
reassembly.c
route.c ipv6: Initialize rt6_info properly in ip6_blackhole_route() 2015-10-16 00:39:16 -07:00
sit.c
syncookies.c
sysctl_net_ipv6.c
tcp_ipv6.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-08-13 16:23:11 -07:00
tcpv6_offload.c
tunnel6.c
udp_impl.h
udp_offload.c
udp.c ipv6: trivial whitespace fix 2015-08-17 14:34:48 -07:00
udplite.c
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c
xfrm6_mode_transport.c
xfrm6_mode_tunnel.c xfrm6: Fix IPv6 ECN decapsulation 2015-08-11 12:41:34 +02:00
xfrm6_output.c
xfrm6_policy.c net: Fix vti use case with oif in dst lookups for IPv6 2015-10-07 04:25:03 -07:00
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c