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:
@@ -506,8 +506,8 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
|
||||
struct net_device *dev = NULL;
|
||||
|
||||
rcu_read_lock();
|
||||
if (rt->fl.iif &&
|
||||
net->ipv4.sysctl_icmp_errors_use_inbound_ifaddr)
|
||||
if (rt_is_input_route(rt) &&
|
||||
net->ipv4.sysctl_icmp_errors_use_inbound_ifaddr)
|
||||
dev = dev_get_by_index_rcu(net, rt->fl.iif);
|
||||
|
||||
if (dev)
|
||||
|
Reference in New Issue
Block a user