aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip6_route.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-06-10 01:36:36 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-11 05:08:47 -0400
commit97bab73f987e2781129cd6f4b6379bf44d808cc6 (patch)
tree40b10c4c021c8b5524c19f79fcfe4b0799b59952 /include/net/ip6_route.h
parentc0efc887dcadbdbfe171f028acfab9c7c00e9dde (diff)
inet: Hide route peer accesses behind helpers.
We encode the pointer(s) into an unsigned long with one state bit. The state bit is used so we can store the inetpeer tree root to use when resolving the peer later. Later the peer roots will be per-FIB table, and this change works to facilitate that. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_route.h')
-rw-r--r--include/net/ip6_route.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 73d750288121..f88a85cf31c3 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -57,11 +57,11 @@ extern void rt6_bind_peer(struct rt6_info *rt, int create);
57 57
58static inline struct inet_peer *__rt6_get_peer(struct rt6_info *rt, int create) 58static inline struct inet_peer *__rt6_get_peer(struct rt6_info *rt, int create)
59{ 59{
60 if (rt->rt6i_peer) 60 if (rt6_has_peer(rt))
61 return rt->rt6i_peer; 61 return rt6_peer_ptr(rt);
62 62
63 rt6_bind_peer(rt, create); 63 rt6_bind_peer(rt, create);
64 return rt->rt6i_peer; 64 return rt6_peer_ptr(rt);
65} 65}
66 66
67static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt) 67static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt)