svn commit: r232107 - stable/8/sys/net
Gleb Smirnoff
glebius at FreeBSD.org
Fri Feb 24 12:32:51 UTC 2012
Author: glebius
Date: Fri Feb 24 12:32:50 2012
New Revision: 232107
URL: http://svn.freebsd.org/changeset/base/232107
Log:
Merge r230598 by kmacy from head:
A flowtable entry can continue referencing an llentry indefinitely
if the entry is repeatedly referenced within its timeout window.
This change clears the LLE_VALID flag when an llentry is removed
from an interface's hash table and adds an extra check to the
flowtable code for the LLE_VALID flag in llentry to avoid retaining
and using a stale reference.
Reviewed by: qingli@
PR: kern/155604
Approved by: re (kib)
Modified:
stable/8/sys/net/flowtable.c
stable/8/sys/net/if_llatbl.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/boot/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/e1000/ (props changed)
Modified: stable/8/sys/net/flowtable.c
==============================================================================
--- stable/8/sys/net/flowtable.c Fri Feb 24 12:22:29 2012 (r232106)
+++ stable/8/sys/net/flowtable.c Fri Feb 24 12:32:50 2012 (r232107)
@@ -1186,12 +1186,14 @@ keycheck:
rt = __DEVOLATILE(struct rtentry *, fle->f_rt);
lle = __DEVOLATILE(struct llentry *, fle->f_lle);
if ((rt != NULL)
+ && lle != NULL
&& fle->f_fhash == hash
&& flowtable_key_equal(fle, key)
&& (proto == fle->f_proto)
&& (fibnum == fle->f_fibnum)
&& (rt->rt_flags & RTF_UP)
- && (rt->rt_ifp != NULL)) {
+ && (rt->rt_ifp != NULL)
+ && (lle->la_flags & LLE_VALID)) {
fs->ft_hits++;
fle->f_uptime = time_uptime;
fle->f_flags |= flags;
Modified: stable/8/sys/net/if_llatbl.c
==============================================================================
--- stable/8/sys/net/if_llatbl.c Fri Feb 24 12:22:29 2012 (r232106)
+++ stable/8/sys/net/if_llatbl.c Fri Feb 24 12:32:50 2012 (r232107)
@@ -125,6 +125,7 @@ llentry_free(struct llentry *lle)
("%s: la_numheld %d > 0, pkts_droped %zd", __func__,
lle->la_numheld, pkts_dropped));
+ lle->la_flags &= ~LLE_VALID;
LLE_FREE_LOCKED(lle);
return (pkts_dropped);
More information about the svn-src-all
mailing list