]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Rearrange how ip_route_newports() gets port keys.
authorDavid S. Miller <davem@davemloft.net>
Thu, 24 Feb 2011 21:38:12 +0000 (13:38 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Feb 2011 21:38:12 +0000 (13:38 -0800)
commitcce1f4b87f6f7c1de661d7cef29c31cbdc85da3c
treef686fef8ef3d80f81bd9f91072ce8c5f347e3e7c
parentd32000a6ee9828f099cbb2f4f846a69b06dbfdcd
ipv4: Rearrange how ip_route_newports() gets port keys.

ip_route_newports() is the only place in the entire kernel that
cares about the port members in the routing cache entry's lookup
flow key.

Therefore the only reason we store an entire flow inside of the
struct rtentry is for this one special case.

Rewrite ip_route_newports() such that:

1) The caller passes in the original port values, so we don't need
   to use the rth->fl.fl_ip_{s,d}port values to remember them.

2) The lookup flow is constructed by hand instead of being copied
   from the routing cache entry's flow.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/route.h
net/dccp/ipv4.c
net/ipv4/tcp_ipv4.c