Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289779
b: refs/heads/master
c: eb85718
h: refs/heads/master
i:
  289777: 6651966
  289775: 5f19990
v: v3
  • Loading branch information
David S. Miller committed Jan 28, 2012
1 parent 5a65b33 commit f734ebe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ec88662041e172acf33d7a15a2020841ee82afb
refs/heads/master: eb857186eb771998fc9ab4bfd398a6fedb5a295c
18 changes: 12 additions & 6 deletions trunk/net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,11 +1223,17 @@ static void ndisc_router_discovery(struct sk_buff *skb)

rt = rt6_get_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev);

if (rt)
neigh = dst_get_neighbour_noref(&rt->dst);

if (rt) {
neigh = dst_neigh_lookup(&rt->dst, &ipv6_hdr(skb)->saddr);
if (!neigh) {
ND_PRINTK0(KERN_ERR
"ICMPv6 RA: %s() got default router without neighbour.\n",
__func__);
dst_release(&rt->dst);
return;
}
}
if (rt && lifetime == 0) {
neigh_clone(neigh);
ip6_del_rt(rt);
rt = NULL;
}
Expand All @@ -1244,7 +1250,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
return;
}

neigh = dst_get_neighbour_noref(&rt->dst);
neigh = dst_neigh_lookup(&rt->dst, &ipv6_hdr(skb)->saddr);
if (neigh == NULL) {
ND_PRINTK0(KERN_ERR
"ICMPv6 RA: %s() got default router without neighbour.\n",
Expand Down Expand Up @@ -1411,7 +1417,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
out:
if (rt)
dst_release(&rt->dst);
else if (neigh)
if (neigh)
neigh_release(neigh);
}

Expand Down

0 comments on commit f734ebe

Please sign in to comment.