Browse Source

[NEIGH]: Fix use of uninitialized variable when trimming in neightbl_fill_parms

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Thomas Graf 20 years ago
parent
commit
e386c6eb43
1 changed files with 3 additions and 1 deletions
  1. 3 1
      net/core/neighbour.c

+ 3 - 1
net/core/neighbour.c

@@ -1555,7 +1555,9 @@ out:
 
 
 static int neightbl_fill_parms(struct sk_buff *skb, struct neigh_parms *parms)
 static int neightbl_fill_parms(struct sk_buff *skb, struct neigh_parms *parms)
 {
 {
-	struct rtattr *nest = RTA_NEST(skb, NDTA_PARMS);
+	struct rtattr *nest = NULL;
+	
+	nest = RTA_NEST(skb, NDTA_PARMS);
 
 
 	if (parms->dev)
 	if (parms->dev)
 		RTA_PUT_U32(skb, NDTPA_IFINDEX, parms->dev->ifindex);
 		RTA_PUT_U32(skb, NDTPA_IFINDEX, parms->dev->ifindex);