android_kernel_oneplus_msm8998/net/ipv6
Gao feng 1716a96101 ipv6: fix problem with expired dst cache
If the ipv6 dst cache which copy from the dst generated by ICMPV6 RA packet.
this dst cache will not check expire because it has no RTF_EXPIRES flag.
So this dst cache will always be used until the dst gc run.

Change the struct dst_entry,add a union contains new pointer from and expires.
When rt6_info.rt6i_flags has no RTF_EXPIRES flag,the dst.expires has no use.
we can use this field to point to where the dst cache copy from.
The dst.from is only used in IPV6.

rt6_check_expired check if rt6_info.dst.from is expired.

ip6_rt_copy only set dst.from when the ort has flag RTF_ADDRCONF
and RTF_DEFAULT.then hold the ort.

ip6_dst_destroy release the ort.

Add some functions to operate the RTF_EXPIRES flag and expires(from) together.
and change the code to use these new adding functions.

Changes from v5:
modify ip6_route_add and ndisc_router_discovery to use new adding functions.

Only set dst.from when the ort has flag RTF_ADDRCONF
and RTF_DEFAULT.then hold the ort.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-13 12:58:29 -04:00
..
netfilter netfilter: ip6_tables: ip6t_ext_hdr is now static inline 2012-04-09 16:29:34 +02:00
addrconf.c ipv6: fix problem with expired dst cache 2012-04-13 12:58:29 -04:00
addrconf_core.c
addrlabel.c
af_inet6.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ah6.c
anycast.c ipv6: Remove never used function inet6_ac_check(). 2012-02-01 16:14:17 -05:00
datagram.c ipv6: helper function to get tclass 2012-02-13 00:45:38 -05:00
esp6.c
exthdrs.c
exthdrs_core.c
fib6_rules.c
icmp.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
inet6_connection_sock.c
inet6_hashtables.c
ip6_fib.c ipv6: fix problem with expired dst cache 2012-04-13 12:58:29 -04:00
ip6_flowlabel.c
ip6_input.c
ip6_output.c ipv6: fix incorrent ipv6 ipsec packet fragment 2012-03-20 05:39:34 -04:00
ip6_tunnel.c
ip6mr.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ipcomp6.c
ipv6_sockglue.c net: implement IP_RECVTOS for IP_PKTOPTIONS 2012-02-13 00:46:41 -05:00
Kconfig
Makefile
mcast.c ipv6: fix array index in ip6_mc_add_src() 2012-04-05 00:00:42 -04:00
mip6.c
ndisc.c ipv6: fix problem with expired dst cache 2012-04-13 12:58:29 -04:00
netfilter.c
proc.c
protocol.c
raw.c ipv6: Implement IPV6_UNICAST_IF socket option. 2012-02-08 15:52:45 -05:00
reassembly.c ipv6: fix RFC5722 comment 2012-01-30 12:58:51 -05:00
route.c ipv6: fix problem with expired dst cache 2012-04-13 12:58:29 -04:00
sit.c
syncookies.c
sysctl_net_ipv6.c
tcp_ipv6.c dmaengine-fixes for 3.4-rc3 2012-04-10 15:30:16 -07:00
tunnel6.c
udp.c datagram: Add offset argument to __skb_recv_datagram 2012-02-21 14:58:57 -05:00
udp_impl.h
udplite.c
xfrm6_input.c
xfrm6_mode_beet.c ipsec: be careful of non existing mac headers 2012-02-23 16:50:45 -05:00
xfrm6_mode_ro.c
xfrm6_mode_transport.c
xfrm6_mode_tunnel.c ipsec: be careful of non existing mac headers 2012-02-23 16:50:45 -05:00
xfrm6_output.c xfrm6: remove unneeded NULL check in __xfrm6_output() 2012-02-01 02:52:48 -05:00
xfrm6_policy.c
xfrm6_state.c
xfrm6_tunnel.c