diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/net/route.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/route.h b/include/net/route.h index 6d111bceb160..3c1eeab9749b 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -70,6 +70,13 @@ static inline bool rt_is_output_route(const struct rtable *rt) | |||
70 | return rt->rt_route_iif == 0; | 70 | return rt->rt_route_iif == 0; |
71 | } | 71 | } |
72 | 72 | ||
73 | static inline __be32 rt_nexthop(const struct rtable *rt, __be32 daddr) | ||
74 | { | ||
75 | if (rt->rt_gateway) | ||
76 | return rt->rt_gateway; | ||
77 | return daddr; | ||
78 | } | ||
79 | |||
73 | struct ip_rt_acct { | 80 | struct ip_rt_acct { |
74 | __u32 o_bytes; | 81 | __u32 o_bytes; |
75 | __u32 o_packets; | 82 | __u32 o_packets; |