diff options
author | David S. Miller <davem@davemloft.net> | 2010-11-11 20:07:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-11 20:07:48 -0500 |
commit | c753796769e4fb0cd813b6e5801b3c01f4681d4f (patch) | |
tree | f137ec0b76593a2aa1a6a263bcc1e4cf82bdf7b5 /net/decnet | |
parent | ed1deb7021b4dfee1d544b91edff4ef92f5c3b54 (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/decnet')
-rw-r--r-- | net/decnet/dn_route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 94a9eb1d313e..474d54dd08c2 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -1181,7 +1181,7 @@ static int __dn_route_output_key(struct dst_entry **pprt, const struct flowi *fl | |||
1181 | if ((flp->fld_dst == rt->fl.fld_dst) && | 1181 | if ((flp->fld_dst == rt->fl.fld_dst) && |
1182 | (flp->fld_src == rt->fl.fld_src) && | 1182 | (flp->fld_src == rt->fl.fld_src) && |
1183 | (flp->mark == rt->fl.mark) && | 1183 | (flp->mark == rt->fl.mark) && |
1184 | (rt->fl.iif == 0) && | 1184 | dn_is_output_route(rt) && |
1185 | (rt->fl.oif == flp->oif)) { | 1185 | (rt->fl.oif == flp->oif)) { |
1186 | dst_use(&rt->dst, jiffies); | 1186 | dst_use(&rt->dst, jiffies); |
1187 | rcu_read_unlock_bh(); | 1187 | rcu_read_unlock_bh(); |
@@ -1512,7 +1512,7 @@ static int dn_rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, | |||
1512 | if (rtnl_put_cacheinfo(skb, &rt->dst, 0, 0, 0, expires, | 1512 | if (rtnl_put_cacheinfo(skb, &rt->dst, 0, 0, 0, expires, |
1513 | rt->dst.error) < 0) | 1513 | rt->dst.error) < 0) |
1514 | goto rtattr_failure; | 1514 | goto rtattr_failure; |
1515 | if (rt->fl.iif) | 1515 | if (dn_is_input_route(rt)) |
1516 | RTA_PUT(skb, RTA_IIF, sizeof(int), &rt->fl.iif); | 1516 | RTA_PUT(skb, RTA_IIF, sizeof(int), &rt->fl.iif); |
1517 | 1517 | ||
1518 | nlh->nlmsg_len = skb_tail_pointer(skb) - b; | 1518 | nlh->nlmsg_len = skb_tail_pointer(skb) - b; |