提交 15c05425 编写于 作者: D David S. Miller

ipv6: Add rt6_get_peer() helper.

To go along side ipv4's rt_get_peer().
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ccb7c410
......@@ -59,6 +59,15 @@ static inline unsigned int rt6_flags2srcprefs(int flags)
extern void rt6_bind_peer(struct rt6_info *rt,
int create);
static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt)
{
if (rt->rt6i_peer)
return rt->rt6i_peer;
rt6_bind_peer(rt, 0);
return rt->rt6i_peer;
}
extern void ip6_route_input(struct sk_buff *skb);
extern struct dst_entry * ip6_route_output(struct net *net,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册