summaryrefslogtreecommitdiffstats
path: root/include/net/ip6_route.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ip6_route.h')
-rw-r--r--include/net/ip6_route.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index f88a85cf31c3..a2cda240ca95 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -61,7 +61,7 @@ static inline struct inet_peer *__rt6_get_peer(struct rt6_info *rt, int create)
return rt6_peer_ptr(rt);
rt6_bind_peer(rt, create);
- return rt6_peer_ptr(rt);
+ return (rt6_has_peer(rt) ? rt6_peer_ptr(rt) : NULL);
}
static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt)