PERFORCE change 123023 for review

Marko Zec zec at FreeBSD.org
Fri Jul 6 16:41:52 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=123023

Change 123023 by zec at 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 */


More information about the p4-projects mailing list