linux/net/ipv4
David S. Miller 6431cbc25f inet: Create a mechanism for upward inetpeer propagation into routes.
If we didn't have a routing cache, we would not be able to properly
propagate certain kinds of dynamic path attributes, for example
PMTU information and redirects.

The reason is that if we didn't have a routing cache, then there would
be no way to lookup all of the active cached routes hanging off of
sockets, tunnels, IPSEC bundles, etc.

Consider the case where we created a cached route, but no inetpeer
entry existed and also we were not asked to pre-COW the route metrics
and therefore did not force the creation a new inetpeer entry.

If we later get a PMTU message, or a redirect, and store this
information in a new inetpeer entry, there is no way to teach that
cached route about the newly existing inetpeer entry.

The facilities implemented here handle this problem.

First we create a generation ID.  When we create a cached route of any
kind, we remember the generation ID at the time of attachment.  Any
time we force-create an inetpeer entry in response to new path
information, we bump that generation ID.

The dst_ops->check() callback is where the knowledge of this event
is propagated.  If the global generation ID does not equal the one
stored in the cached route, and the cached route has not attached
to an inetpeer yet, we look it up and attach if one is found.  Now
that we've updated the cached route's information, we update the
route's generation ID too.

This clears the way for implementing PMTU and redirects directly in
the inetpeer cache.  There is absolutely no need to consult cached
route information in order to maintain this information.

At this point nothing bumps the inetpeer genids, that comes in the
later changes which handle PMTUs and redirects using inetpeers.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-10 13:33:41 -08:00
..
netfilter Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-02-04 14:28:58 -08:00
af_inet.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-01-31 13:13:24 -08:00
ah4.c ipsec: allow to align IPv4 AH on 32 bits 2011-02-08 14:00:40 -08:00
arp.c net: arp_ioctl() must hold RTNL 2011-01-24 13:16:16 -08:00
cipso_ipv4.c
datagram.c
devinet.c ipv4: Don't pre-seed hoplimit metric. 2010-12-12 22:08:17 -08:00
esp4.c xfrm: Traffic Flow Confidentiality for IPv4 ESP 2010-12-10 14:43:59 -08:00
fib_frontend.c ipv4: Update some fib_hash centric interface names. 2011-02-01 15:35:25 -08:00
fib_lookup.h ipv4: Remember FIB alias list head and table in lookup results. 2011-01-31 16:10:03 -08:00
fib_rules.c netfilter: fix Kconfig dependencies 2011-01-14 13:36:42 +01:00
fib_semantics.c ipv4: Rename fib_hash_* locals in fib_semantics.c 2011-02-01 15:35:26 -08:00
fib_trie.c ipv4: Fix fib_trie build in some configurations. 2011-02-02 20:48:47 -08:00
gre.c
icmp.c inetpeer: Move ICMP rate limiting state into inet_peer entries. 2011-02-04 15:59:53 -08:00
igmp.c
inet_connection_sock.c tcp: disallow bind() to reuse addr/port 2011-01-11 14:03:07 -08:00
inet_diag.c Revert "netlink: test for all flags of the NLM_F_DUMP composite" 2011-01-19 13:34:20 -08:00
inet_fragment.c
inet_hashtables.c
inet_lro.c
inet_timewait_sock.c
inetpeer.c inetpeer: Add redirect and PMTU discovery cached info. 2011-02-10 13:29:30 -08:00
ip_forward.c
ip_fragment.c ipv4: IP defragmentation must be ECN aware 2011-01-06 11:21:30 -08:00
ip_gre.c ipv4: Don't pre-seed hoplimit metric. 2010-12-12 22:08:17 -08:00
ip_input.c netfilter: fix Kconfig dependencies 2011-01-14 13:36:42 +01:00
ip_options.c
ip_output.c ipv4: Don't pre-seed hoplimit metric. 2010-12-12 22:08:17 -08:00
ip_sockglue.c
ipcomp.c
ipconfig.c
ipip.c ipip: add module alias for tunl0 tunnel device 2010-12-01 12:53:23 -08:00
ipmr.c net: Support compat SIOCGETVIFCNT ioctl in ipv4. 2011-02-03 17:24:28 -08:00
Kconfig ipv4: Remove fib_hash. 2011-02-01 15:35:25 -08:00
Makefile ipv4: Remove fib_hash. 2011-02-01 15:35:25 -08:00
netfilter.c
proc.c tcp: Replace time wait bucket msg by counter 2010-12-08 12:16:33 -08:00
protocol.c
raw.c net: Add compat ioctl support for the ipv4 multicast ioctl SIOCGETSGCNT 2011-01-30 01:14:38 -08:00
route.c inet: Create a mechanism for upward inetpeer propagation into routes. 2011-02-10 13:33:41 -08:00
syncookies.c
sysctl_net_ipv4.c net: add limits to ip_default_ttl 2010-12-13 12:16:14 -08:00
tcp_bic.c
tcp_cong.c
tcp_cubic.c
tcp_diag.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: Increase the initial congestion window to 10. 2011-02-02 20:48:47 -08:00
tcp_ipv4.c inetpeer: Abstract address representation further. 2011-02-10 13:22:28 -08:00
tcp_lp.c
tcp_minisocks.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-12-08 13:47:38 -08:00
tcp_output.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-01-13 10:05:56 -08:00
tcp_probe.c
tcp_scalable.c
tcp_timer.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tcp.c net: change netdev->features to u32 2011-01-24 15:32:47 -08:00
tunnel4.c
udp_impl.h
udp.c net: change netdev->features to u32 2011-01-24 15:32:47 -08:00
udplite.c net: fix nulls list corruptions in sk_prot_alloc 2010-12-16 14:26:56 -08:00
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c ipv4: Don't pre-seed hoplimit metric. 2010-12-12 22:08:17 -08:00
xfrm4_output.c
xfrm4_policy.c net: Implement read-only protection and COW'ing of metrics. 2011-01-26 20:51:05 -08:00
xfrm4_state.c
xfrm4_tunnel.c