summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
authorRongQing.Li2012-02-21 23:10:49 +0100
committerDavid S. Miller2012-02-22 21:30:14 +0100
commit5095d64db1b978bdb31d30fed9e47dbf04f729be (patch)
treea912b34b0f78b40f46fde374fae530211ef22c4c /net/ipv6/ndisc.c
parentjme: Fix FIFO flush issue (diff)
downloadkernel-qcow2-linux-5095d64db1b978bdb31d30fed9e47dbf04f729be.tar.gz
kernel-qcow2-linux-5095d64db1b978bdb31d30fed9e47dbf04f729be.tar.xz
kernel-qcow2-linux-5095d64db1b978bdb31d30fed9e47dbf04f729be.zip
ipv6: ip6_route_output() never returns NULL.
ip6_route_output() never returns NULL, so it is wrong to check if the return value is NULL. Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r--net/ipv6/ndisc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index d8f02ef88e59..c964958ac470 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1545,9 +1545,10 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
&saddr_buf, &ipv6_hdr(skb)->saddr, dev->ifindex);
dst = ip6_route_output(net, NULL, &fl6);
- if (dst == NULL)
+ if (dst->error) {
+ dst_release(dst);
return;
-
+ }
dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0);
if (IS_ERR(dst))
return;