aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-11-11 17:07:48 -0800
committerDavid S. Miller <davem@davemloft.net>2010-11-11 17:07:48 -0800
commitc753796769e4fb0cd813b6e5801b3c01f4681d4f (patch)
treef137ec0b76593a2aa1a6a263bcc1e4cf82bdf7b5 /net/decnet
parented1deb7021b4dfee1d544b91edff4ef92f5c3b54 (diff)
downloadkernel_samsung_smdk4412-c753796769e4fb0cd813b6e5801b3c01f4681d4f.zip
kernel_samsung_smdk4412-c753796769e4fb0cd813b6e5801b3c01f4681d4f.tar.gz
kernel_samsung_smdk4412-c753796769e4fb0cd813b6e5801b3c01f4681d4f.tar.bz2
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 94a9eb1..474d54d 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
if ((flp->fld_dst == rt->fl.fld_dst) &&
(flp->fld_src == rt->fl.fld_src) &&
(flp->mark == rt->fl.mark) &&
- (rt->fl.iif == 0) &&
+ dn_is_output_route(rt) &&
(rt->fl.oif == flp->oif)) {
dst_use(&rt->dst, jiffies);
rcu_read_unlock_bh();
@@ -1512,7 +1512,7 @@ static int dn_rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq,
if (rtnl_put_cacheinfo(skb, &rt->dst, 0, 0, 0, expires,
rt->dst.error) < 0)
goto rtattr_failure;
- if (rt->fl.iif)
+ if (dn_is_input_route(rt))
RTA_PUT(skb, RTA_IIF, sizeof(int), &rt->fl.iif);
nlh->nlmsg_len = skb_tail_pointer(skb) - b;