提交 a2de86f6 编写于 作者: S Steffen Klassert 提交者: David S. Miller

ipv6: Initialize the neighbour pointer of rt6_info on allocation

git commit 97cac082 (ipv6: Store route neighbour in rt6_info struct)
added a neighbour pointer to rt6_info. Currently we don't initialize
this pointer at allocation time. We assume this pointer to be valid
if it is not a null pointer, so initialize it on allocation.
Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c90a9bb9
......@@ -273,7 +273,7 @@ static inline struct rt6_info *ip6_dst_alloc(struct net *net,
0, 0, flags);
if (rt) {
memset(&rt->rt6i_table, 0,
memset(&rt->n, 0,
sizeof(*rt) - sizeof(struct dst_entry));
rt6_init_peer(rt, table ? &table->tb6_peers : net->ipv6.peers);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册