aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-11-11 20:07:48 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-11 20:07:48 -0500
commitc753796769e4fb0cd813b6e5801b3c01f4681d4f (patch)
treef137ec0b76593a2aa1a6a263bcc1e4cf82bdf7b5 /net/ipv4/icmp.c
parented1deb7021b4dfee1d544b91edff4ef92f5c3b54 (diff)
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>
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r--net/ipv4/icmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 96bc7f9475a3..c6e2affafbd3 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -506,8 +506,8 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
506 struct net_device *dev = NULL; 506 struct net_device *dev = NULL;
507 507
508 rcu_read_lock(); 508 rcu_read_lock();
509 if (rt->fl.iif && 509 if (rt_is_input_route(rt) &&
510 net->ipv4.sysctl_icmp_errors_use_inbound_ifaddr) 510 net->ipv4.sysctl_icmp_errors_use_inbound_ifaddr)
511 dev = dev_get_by_index_rcu(net, rt->fl.iif); 511 dev = dev_get_by_index_rcu(net, rt->fl.iif);
512 512
513 if (dev) 513 if (dev)