aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2012-07-04 23:18:28 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-05 17:20:07 -0400
commita2de86f63cfc92f7aaf11e7b9d9f2150946a1622 (patch)
tree770781fb05fd4816eba9597fa5aa435cfd3e1788 /net/ipv6
parentc90a9bb9073a4096596360f02ea711c619663494 (diff)
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>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index ceff71d24f8e..6cc6c881f54f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -273,7 +273,7 @@ static inline struct rt6_info *ip6_dst_alloc(struct net *net,
273 0, 0, flags); 273 0, 0, flags);
274 274
275 if (rt) { 275 if (rt) {
276 memset(&rt->rt6i_table, 0, 276 memset(&rt->n, 0,
277 sizeof(*rt) - sizeof(struct dst_entry)); 277 sizeof(*rt) - sizeof(struct dst_entry));
278 rt6_init_peer(rt, table ? &table->tb6_peers : net->ipv6.peers); 278 rt6_init_peer(rt, table ? &table->tb6_peers : net->ipv6.peers);
279 } 279 }