Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318923
b: refs/heads/master
c: 4331deb
h: refs/heads/master
i:
  318921: 112b72e
  318919: ab6a24b
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jul 25, 2012
1 parent 931a7c9 commit a89ff13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d8d2dd8ad92ec89f540e73b7a46c5835a7a06a6
refs/heads/master: 4331debc51ee1ce319f4a389484e0e8e05de2aca
8 changes: 5 additions & 3 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ static inline int ip_rt_proc_init(void)
}
#endif /* CONFIG_PROC_FS */

static inline int rt_is_expired(struct rtable *rth)
static inline bool rt_is_expired(const struct rtable *rth)
{
return rth->rt_genid != rt_genid(dev_net(rth->dst.dev));
}
Expand Down Expand Up @@ -1222,9 +1222,11 @@ static void rt_cache_route(struct fib_nh *nh, struct rtable *rt)
}
}

static bool rt_cache_valid(struct rtable *rt)
static bool rt_cache_valid(const struct rtable *rt)
{
return (rt && rt->dst.obsolete == DST_OBSOLETE_FORCE_CHK);
return rt &&
rt->dst.obsolete == DST_OBSOLETE_FORCE_CHK &&
!rt_is_expired(rt);
}

static void rt_set_nexthop(struct rtable *rt, __be32 daddr,
Expand Down

0 comments on commit a89ff13

Please sign in to comment.