1
linux/net/ipv4
David S. Miller 1fc050a134 ipv4: Cache source address in nexthop entries.
When doing output route lookups, we have to select the source address
if the user has not specified an explicit one.

First, if the route has an explicit preferred source address
specified, then we use that.

Otherwise we search the route's outgoing interface for a suitable
address.

This search can be precomputed and cached at route insertion time.

The only missing part is that we have to refresh this precomputed
value any time addresses are added or removed from the interface, and
this is accomplished by fib_update_nh_saddrs().

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-07 20:54:48 -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 ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -08:00
ah4.c ipsec: allow to align IPv4 AH on 32 bits 2011-02-08 14:00:40 -08:00
arp.c ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -08:00
cipso_ipv4.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
datagram.c ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -08:00
devinet.c ipv4: Fix __ip_dev_find() to use ifa_local instead of ifa_address. 2011-03-03 11:24:19 -08:00
esp4.c xfrm: Traffic Flow Confidentiality for IPv4 ESP 2010-12-10 14:43:59 -08:00
fib_frontend.c ipv4: Cache source address in nexthop entries. 2011-03-07 20:54:48 -08:00
fib_lookup.h ipv4: Inline fib_semantic_match into check_leaf 2011-03-07 15:19:39 -08:00
fib_rules.c ipv4: Use const'ify fib_result deep in the route call chains. 2011-02-17 15:54:42 -08:00
fib_semantics.c ipv4: Cache source address in nexthop entries. 2011-03-07 20:54:48 -08:00
fib_trie.c ipv4: Inline fib_semantic_match into check_leaf 2011-03-07 15:19:39 -08:00
gre.c tunnels: add _rcu annotations 2010-10-25 13:09:45 -07:00
icmp.c ipv4: Remove flowi from struct rtable. 2011-03-04 21:55:31 -08:00
igmp.c ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -08:00
inet_connection_sock.c ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -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 net/ipv4: EXPORT_SYMBOL cleanups 2010-07-12 12:57:54 -07:00
inet_hashtables.c inet: Fix __inet_inherit_port() to correctly increment bsockets and num_owners 2010-11-28 18:18:44 -08:00
inet_lro.c
inet_timewait_sock.c tcp: fix inet_twsk_deschedule() 2011-02-19 18:59:04 -08:00
inetpeer.c inetpeer: seqlock optimization 2011-03-04 14:33:59 -08:00
ip_forward.c net-next: remove useless union keyword 2010-06-10 23:31:35 -07:00
ip_fragment.c ipv4: IP defragmentation must be ECN aware 2011-01-06 11:21:30 -08:00
ip_gre.c ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -08:00
ip_input.c netfilter: fix Kconfig dependencies 2011-01-14 13:36:42 +01:00
ip_options.c bridge : Sanitize skb before it enters the IP stack 2010-09-19 12:42:34 -07:00
ip_output.c ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -08:00
ip_sockglue.c ipv4: add __rcu annotations to ip_ra_chain 2010-10-25 14:18:28 -07:00
ipcomp.c
ipconfig.c net: add some KERN_CONT markers to continuation lines 2010-11-28 10:47:17 -08:00
ipip.c ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -08:00
ipmr.c ipv4: Remove flowi from struct rtable. 2011-03-04 21:55:31 -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 ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -08:00
proc.c tcp: Replace time wait bucket msg by counter 2010-12-08 12:16:33 -08:00
protocol.c net: add __rcu annotations to protocol 2010-10-27 11:37:31 -07:00
raw.c ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -08:00
route.c ipv4: Remove flowi from struct rtable. 2011-03-04 21:55:31 -08:00
syncookies.c ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -08:00
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 net/ipv4: Eliminate kstrdup memory leak 2010-08-27 19:31:56 -07:00
tcp_cubic.c
tcp_diag.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c TCP: tcp_hybla: Fix integer overflow in slow start increment 2010-06-02 07:15:48 -07:00
tcp_illinois.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
tcp_input.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-03-03 21:27:42 -08:00
tcp_ipv4.c ipv4: Make output route lookup return rtable directly. 2011-03-02 14:31:35 -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 tcp: undo_retrans counter fixes 2011-02-21 11:31:18 -08:00
tcp_probe.c net: ipv4: tcp_probe: cleanup snprintf() use 2010-11-17 12:27:46 -08:00
tcp_scalable.c
tcp_timer.c tcp: Remove debug macro of TCP_CHECK_TIMER 2011-02-20 11:10:14 -08:00
tcp_vegas.c
tcp_vegas.h
tcp_veno.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
tcp_westwood.c net: return operator cleanup 2010-09-23 14:33:39 -07:00
tcp_yeah.c
tcp.c tcp: Remove debug macro of TCP_CHECK_TIMER 2011-02-20 11:10:14 -08:00
tunnel4.c tunnels: add __rcu annotations 2010-10-27 11:37:32 -07:00
udp_impl.h
udp.c ipv4: Fix crash in dst_release when udp_sendmsg route lookup fails. 2011-03-03 10:38:01 -08:00
udplite.c net: fix nulls list corruptions in sk_prot_alloc 2010-12-16 14:26:56 -08:00
xfrm4_input.c net/ipv4: EXPORT_SYMBOL cleanups 2010-07-12 12:57:54 -07:00
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 ipv4: Remove flowi from struct rtable. 2011-03-04 21:55:31 -08:00
xfrm4_state.c xfrm: Const'ify tmpl and address arguments to ->init_temprop() 2011-02-23 23:07:37 -08:00
xfrm4_tunnel.c net: struct xfrm_tunnel in read_mostly section 2010-08-30 13:50:45 -07:00