svn commit: r184705 - user/kmacy/HEAD_multi_tx/sys/net

Kip Macy kmacy at FreeBSD.org
Wed Nov 5 20:51:09 PST 2008


Author: kmacy
Date: Thu Nov  6 04:51:09 2008
New Revision: 184705
URL: http://svn.freebsd.org/changeset/base/184705

Log:
  although the rt should never be NULL if the hash is set ... check that rt is set

Modified:
  user/kmacy/HEAD_multi_tx/sys/net/flowtable.c

Modified: user/kmacy/HEAD_multi_tx/sys/net/flowtable.c
==============================================================================
--- user/kmacy/HEAD_multi_tx/sys/net/flowtable.c	Thu Nov  6 02:41:08 2008	(r184704)
+++ user/kmacy/HEAD_multi_tx/sys/net/flowtable.c	Thu Nov  6 04:51:09 2008	(r184705)
@@ -441,6 +441,7 @@ flow_stale(struct flowtable *ft, struct 
 	time_t idle_time;
 
 	if ((fle->f_fhash == 0)
+	    || (fle->f_rt == NULL)
 	    || ((fle->f_rt->rt_flags & RTF_UP) == 0)
 	    || (fle->f_uptime <= fle->f_rt->rt_llinfo_uptime)
 	    || ((fle->f_rt->rt_flags & RTF_GATEWAY) &&
@@ -506,7 +507,8 @@ retry:	
 		FL_ENTRY_UNLOCK(ft, hash);
 		if (!stale)
 			return (ENOSPC);
-		RTFREE(rt0);
+		if (rt0)
+			RTFREE(rt0);
 		/*
 		 * We might end up on a different cpu
 		 */


More information about the svn-src-user mailing list