Skip to content

Commit

Permalink
ipv6: fix icmp6_dst_alloc()
Browse files Browse the repository at this point in the history
commit 87a1157 ( ipv6: Move xfrm_lookup() call down into
icmp6_dst_alloc().) forgot to convert one error path, leading
to crashes in mld_sendpack()

Many thanks to Dave Jones for providing a very complete bug report.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and davem330 committed Mar 16, 2012
1 parent 762ad8a commit 122bdf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/route.c
Expand Up @@ -1077,7 +1077,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
struct net *net = dev_net(dev);

if (unlikely(!idev))
return NULL;
return ERR_PTR(-ENODEV);

rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, dev, 0);
if (unlikely(!rt)) {
Expand Down

0 comments on commit 122bdf6

Please sign in to comment.