diff options
Diffstat (limited to 'include/net/route.h')
-rw-r--r-- | include/net/route.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/net/route.h b/include/net/route.h index 7e5e73bfa4d..5cd46d1c0e1 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -55,8 +55,6 @@ struct rtable { /* Cache lookup keys */ struct flowi fl; - struct in_device *idev; - int rt_genid; unsigned rt_flags; __u16 rt_type; @@ -73,6 +71,16 @@ struct rtable { struct inet_peer *peer; /* long-living peer info */ }; +static inline bool rt_is_input_route(struct rtable *rt) +{ + return rt->fl.iif != 0; +} + +static inline bool rt_is_output_route(struct rtable *rt) +{ + return rt->fl.iif == 0; +} + struct ip_rt_acct { __u32 o_bytes; __u32 o_packets; |