From owner-p4-projects@FreeBSD.ORG Fri Jul 6 16:41:52 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 22BA116A494; Fri, 6 Jul 2007 16:41:52 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ECE9816A482 for ; Fri, 6 Jul 2007 16:41:51 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id DE09313C46A for ; Fri, 6 Jul 2007 16:41:51 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l66GfpN5028962 for ; Fri, 6 Jul 2007 16:41:51 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l66GfpWE028959 for perforce@freebsd.org; Fri, 6 Jul 2007 16:41:51 GMT (envelope-from zec@FreeBSD.org) Date: Fri, 6 Jul 2007 16:41:51 GMT Message-Id: <200707061641.l66GfpWE028959@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 123023 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2007 16:41:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=123023 Change 123023 by zec@zec_tca51 on 2007/07/06 16:41:46 linkNum in ng_bridge can be equal to NG_BRIDGE_MAX_LINKS since the introduction of a special-purpose "anchor" hook, which is always has the maximum possible linkNum. Hence, update the assert accordingly not to panic on "anchor" hook deletion. NB. the "anchor" hack might become replaced by a more generic mechanism in the future for pinning up persisten ng nodes. Affected files ... .. //depot/projects/vimage/src/sys/netgraph/ng_bridge.c#3 edit Differences ... ==== //depot/projects/vimage/src/sys/netgraph/ng_bridge.c#3 (text+ko) ==== @@ -791,7 +791,7 @@ /* Get link number */ linkNum = (intptr_t)NG_HOOK_PRIVATE(hook); - KASSERT(linkNum >= 0 && linkNum < NG_BRIDGE_MAX_LINKS, + KASSERT(linkNum >= 0 && linkNum <= NG_BRIDGE_MAX_LINKS, ("%s: linkNum=%u", __func__, linkNum)); /* Remove all hosts associated with this link */