Skip to content
Commit f8126f1d authored by David S. Miller's avatar David S. Miller
Browse files

ipv4: Adjust semantics of rt->rt_gateway.



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: default avatarDavid S. Miller <davem@davemloft.net>
Tested-by: default avatarVijay Subramanian <subramanian.vijay@gmail.com>
parent f1ce3062
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment