ipv4: Make rt->fl.iif tests lest obscure.
When we test rt->fl.iif against zero, we're seeing if it's an output or an input route. Make that explicit with some helper functions. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -80,6 +80,16 @@ struct dn_route {
|
||||
unsigned rt_type;
|
||||
};
|
||||
|
||||
static inline bool dn_is_input_route(struct dn_route *rt)
|
||||
{
|
||||
return rt->fl.iif != 0;
|
||||
}
|
||||
|
||||
static inline bool dn_is_output_route(struct dn_route *rt)
|
||||
{
|
||||
return rt->fl.iif == 0;
|
||||
}
|
||||
|
||||
extern void dn_route_init(void);
|
||||
extern void dn_route_cleanup(void);
|
||||
|
||||
|
Reference in New Issue
Block a user