From owner-p4-projects@FreeBSD.ORG Sat Oct 30 06:09:36 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C7D416A4D0; Sat, 30 Oct 2004 06:09:36 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27B5816A4CE for ; Sat, 30 Oct 2004 06:09:36 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18EA543D1D for ; Sat, 30 Oct 2004 06:09:36 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i9U69ZnI029161 for ; Sat, 30 Oct 2004 06:09:35 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i9U69ZiC029158 for perforce@freebsd.org; Sat, 30 Oct 2004 06:09:35 GMT (envelope-from sam@freebsd.org) Date: Sat, 30 Oct 2004 06:09:35 GMT Message-Id: <200410300609.i9U69ZiC029158@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 63967 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2004 06:09:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=63967 Change 63967 by sam@sam_ebb on 2004/10/30 06:09:23 Hold a refcnt on nodes created by probe request frames; this closes a race condition where the refcnt can go to zero due to queueing. May still need to shorten the timeout on these nodes so they are reclaimed quickly and not hold resources. Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#8 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#8 (text+ko) ==== @@ -1931,20 +1931,13 @@ } if (allocbs) { /* - * When operating as an AP we discard the node's - * state until the station requests authentication. - * This may be better done by holding it and setting - * a short timer for reclaiming it but reduces the - * possibility of stations flooding us with probe - * requests causing our memory use to grow quickly - * (though this can still happen if they send - * authentication requests). When operating in ibss - * mode we hold the node but with a zero reference - * count; this is the current convention (XXX). + * When operating in ibss mode we hold the node but + * with a zero reference count; this is the current + * convention (XXX). For other cases we do nothing + * as the node is created with a short inactivity + * timer (may want to shorten it further here). */ - if (ic->ic_opmode == IEEE80211_M_HOSTAP) - ieee80211_free_node(ic, ni); - else + if (ic->ic_opmode == IEEE80211_M_IBSS) ieee80211_unref_node(&ni); } break;