• David S. Miller's avatar
    ipv4: Rearrange how ip_route_newports() gets port keys. · dca8b089
    David S. Miller authored
    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: default avatarDavid S. Miller <davem@davemloft.net>
    dca8b089
ipv4.c 27.9 KB