Module Name: src Committed By: rmind Date: Sun Feb 5 00:41:15 UTC 2012
Modified Files: src/sys/netinet6: ip6_output.c Log Message: ip6_output: check for rtcache_setdst() error, which may happen if running out of memory. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/netinet6/ip6_output.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet6/ip6_output.c diff -u src/sys/netinet6/ip6_output.c:1.144 src/sys/netinet6/ip6_output.c:1.145 --- src/sys/netinet6/ip6_output.c:1.144 Tue Jan 10 20:05:37 2012 +++ src/sys/netinet6/ip6_output.c Sun Feb 5 00:41:15 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_output.c,v 1.144 2012/01/10 20:05:37 drochner Exp $ */ +/* $NetBSD: ip6_output.c,v 1.145 2012/02/05 00:41:15 rmind Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.144 2012/01/10 20:05:37 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.145 2012/02/05 00:41:15 rmind Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -677,7 +677,10 @@ skip_ipsec2:; * If in6_selectroute() does not return a route entry, * dst may not have been updated. */ - rtcache_setdst(ro, sin6tosa(&dst_sa)); + error = rtcache_setdst(ro, sin6tosa(&dst_sa)); + if (error) { + goto bad; + } } /*