ipv4: Adjust semantics of rt->rt_gateway.
authorDavid S. Miller <davem@davemloft.net>
Fri, 13 Jul 2012 12:03:45 +0000 (05:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jul 2012 20:31:20 +0000 (13:31 -0700)
In order to allow prefixed routes, we have to adjust how rt_gateway
is set and interpreted.

The new interpretation is:

1) rt_gateway == 0, destination is on-link, nexthop is iph->daddr

2) rt_gateway != 0, destination requires a nexthop gateway

Abstract the fetching of the proper nexthop value using a new
inline helper, rt_nexthop(), as suggested by Joe Perches.

Signed-off-by: David S. Miller <davem@davemloft.net>
Tested-by: Vijay Subramanian <subramanian.vijay@gmail.com>

No differences found