From: Steffen Klassert Date: Thu, 5 Jul 2012 03:18:28 +0000 (+0000) Subject: ipv6: Initialize the neighbour pointer of rt6_info on allocation X-Git-Tag: v3.6-rc1~125^2~287 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=a2de86f63cfc92f7aaf11e7b9d9f2150946a1622 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 Signed-off-by: David S. Miller --- 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, 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); }