aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/ipv6.c
diff options
context:
space:
mode:
authorVille Nuorvala <vnuorval@tcs.hut.fi>2006-10-17 01:10:05 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-18 22:55:27 -0400
commit4251320fa2ef93207fbefeb2eda2d265b84fc116 (patch)
tree7d322c9d541f24df4fedc38e964aa906226b52ad /net/sctp/ipv6.c
parent23c435f7ff884caded4a1391ba2b308d465423c0 (diff)
[IPV6]: Make sure error handling is done when calling ip6_route_output().
As ip6_route_output() never returns NULL, error checking must be done by looking at dst->error in stead of comparing dst against NULL. Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/ipv6.c')
-rw-r--r--net/sctp/ipv6.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 249e5033c1a8..78071c6e6cf1 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -215,17 +215,17 @@ static struct dst_entry *sctp_v6_get_dst(struct sctp_association *asoc,
215 } 215 }
216 216
217 dst = ip6_route_output(NULL, &fl); 217 dst = ip6_route_output(NULL, &fl);
218 if (dst) { 218 if (!dst->error) {
219 struct rt6_info *rt; 219 struct rt6_info *rt;
220 rt = (struct rt6_info *)dst; 220 rt = (struct rt6_info *)dst;
221 SCTP_DEBUG_PRINTK( 221 SCTP_DEBUG_PRINTK(
222 "rt6_dst:" NIP6_FMT " rt6_src:" NIP6_FMT "\n", 222 "rt6_dst:" NIP6_FMT " rt6_src:" NIP6_FMT "\n",
223 NIP6(rt->rt6i_dst.addr), NIP6(rt->rt6i_src.addr)); 223 NIP6(rt->rt6i_dst.addr), NIP6(rt->rt6i_src.addr));
224 } else { 224 return dst;
225 SCTP_DEBUG_PRINTK("NO ROUTE\n");
226 } 225 }
227 226 SCTP_DEBUG_PRINTK("NO ROUTE\n");
228 return dst; 227 dst_release(dst);
228 return NULL;
229} 229}
230 230
231/* Returns the number of consecutive initial bits that match in the 2 ipv6 231/* Returns the number of consecutive initial bits that match in the 2 ipv6