ipv4: Create and use fib_compute_spec_dst() helper.
authorDavid S. Miller <davem@davemloft.net>
Thu, 28 Jun 2012 10:59:11 +0000 (03:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Jun 2012 10:59:11 +0000 (03:59 -0700)
commit35ebf65e851c6d9731abc6362b189858eb59f4d3
tree2e78c2c81bc72aeeb172484996cdff268f0111a2
parent70e7341673a47fb1525cfc7d6651cc98b5348928
ipv4: Create and use fib_compute_spec_dst() helper.

The specific destination is the host we direct unicast replies to.
Usually this is the original packet source address, but if we are
responding to a multicast or broadcast packet we have to use something
different.

Specifically we must use the source address we would use if we were to
send a packet to the unicast source of the original packet.

The routing cache precomputes this value, but we want to remove that
precomputation because it creates a hard dependency on the expensive
rpfilter source address validation which we'd like to make cheaper.

There are only three places where this matters:

1) ICMP replies.

2) pktinfo CMSG

3) IP options

Now there will be no real users of rt->rt_spec_dst and we can simply
remove it altogether.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip_fib.h
net/ipv4/fib_frontend.c
net/ipv4/icmp.c
net/ipv4/ip_options.c
net/ipv4/ip_sockglue.c
This page took 0.026085 seconds and 5 git commands to generate.