dect
/
linux-2.6
Archived
13
0
Fork 0

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: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Steffen Klassert 2012-07-05 03:18:28 +00:00 committed by David S. Miller
parent c90a9bb907
commit a2de86f63c
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}