linux-stable/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 net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
addrlabel.c rtnetlink: Compute and store minimum ifinfo dump size 2011-06-09 20:38:07 -07:00
af_inet6.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ah6.c net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
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 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-05-05 14:59:02 -07:00
exthdrs.c net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
exthdrs_core.c ipv6: Add fragment reporting to ipv6_skip_exthdr(). 2011-12-03 09:35:10 -08:00
fib6_rules.c net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
icmp.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
inet6_connection_sock.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-11-26 14:47:03 -05:00
inet6_hashtables.c net: Compute protocol sequence numbers and fragment IDs using MD5. 2011-08-06 18:33:19 -07:00
ip6_fib.c ipv6: fix problem with expired dst cache 2012-04-13 12:58:29 -04:00
ip6_flowlabel.c net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
ip6_input.c ipv6: Add fragment reporting to ipv6_skip_exthdr(). 2011-12-03 09:35:10 -08:00
ip6_output.c ipv6: fix incorrent ipv6 ipsec packet fragment 2012-03-20 05:39:34 -04:00
ip6_tunnel.c net: reintroduce missing rcu_assign_pointer() calls 2012-01-12 12:26:56 -08:00
ip6mr.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ipcomp6.c inet: constify ip headers and in6_addr 2011-04-22 11:04:14 -07:00
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 net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
ndisc.c ipv6: fix problem with expired dst cache 2012-04-13 12:58:29 -04:00
netfilter.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
proc.c ipv6: fix per device IP snmp counters 2012-01-17 23:56:18 -05:00
protocol.c net: add __rcu annotations to protocol 2010-10-27 11:37:31 -07:00
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 ipv6: sit: Convert to dst_neigh_lookup() 2012-01-26 15:23:21 -05:00
syncookies.c net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
sysctl_net_ipv6.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
tcp_ipv6.c dmaengine-fixes for 3.4-rc3 2012-04-10 15:30:16 -07:00
tunnel6.c tunnels: add _rcu annotations 2010-10-25 13:09:45 -07:00
udp.c datagram: Add offset argument to __skb_recv_datagram 2012-02-21 14:58:57 -05:00
udp_impl.h
udplite.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
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 net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
xfrm6_state.c net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
xfrm6_tunnel.c ipv6: Fix return of xfrm6_tunnel_rcv() 2011-05-24 01:11:51 -04:00