svn commit: r303657 - head/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Tue Aug 2 12:18:07 UTC 2016


Author: ae
Date: Tue Aug  2 12:18:06 2016
New Revision: 303657
URL: https://svnweb.freebsd.org/changeset/base/303657

Log:
  Fix NULL pointer dereference.
  ro pointer can be NULL when IPSec consumes mbuf.
  
  PR:		211486
  MFC after:	3 days

Modified:
  head/sys/netinet6/ip6_output.c

Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c	Tue Aug  2 06:36:47 2016	(r303656)
+++ head/sys/netinet6/ip6_output.c	Tue Aug  2 12:18:06 2016	(r303657)
@@ -1058,7 +1058,8 @@ done:
 	 * Release the route if using our private route, or if
 	 * (with flowtable) we don't have our own reference.
 	 */
-	if (ro == &ip6route || ro->ro_flags & RT_NORTREF)
+	if (ro == &ip6route ||
+	    (ro != NULL && ro->ro_flags & RT_NORTREF))
 		RO_RTFREE(ro);
 	return (error);
 


More information about the svn-src-head mailing list