From owner-cvs-all@FreeBSD.ORG Tue Oct 11 13:48:38 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D86DC16A43D; Tue, 11 Oct 2005 13:48:38 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B40943D67; Tue, 11 Oct 2005 13:48:38 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j9BDmcdY035020; Tue, 11 Oct 2005 13:48:38 GMT (envelope-from glebius@repoman.freebsd.org) Received: (from glebius@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j9BDmch3035019; Tue, 11 Oct 2005 13:48:38 GMT (envelope-from glebius) Message-Id: <200510111348.j9BDmch3035019@repoman.freebsd.org> From: Gleb Smirnoff Date: Tue, 11 Oct 2005 13:48:38 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/netgraph ng_base.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2005 13:48:39 -0000 glebius 2005-10-11 13:48:38 UTC FreeBSD src repository Modified files: sys/netgraph ng_base.c Log: Fix a regression introduced in rev. 1.107. If an item once had a writer semantics, and then was reused for next node, it still would be applied as writer again. To fix the regression the decision is made never to alter item->el_flags after the item has been allocated. This requires checking for overrides both in ng_dequeue() and in ng_snd_item(). Details: - Caller of the ng_apply_item() knows what is the current access to node and specifies it to ng_apply_item(). The latter drops the given access after item has beem applied. - ng_dequeue() needs to be supplied with int pointer, where it stores the obtained access on node. - Check for node/hook access overrides in ng_dequeue(). Revision Changes Path 1.113 +28 -22 src/sys/netgraph/ng_base.c