summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_base.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2006-06-07 12:42:15 +0000
committerglebius <glebius@FreeBSD.org>2006-06-07 12:42:15 +0000
commite091fdc169106db4a26d45d02c2f30fe9c708556 (patch)
treea328ae43a8b49ef7e755605b8dc1a03871eea387 /sys/netgraph/ng_base.c
parent85fd6e8410c7e01c7c369facd24f8d9d330027ed (diff)
downloadFreeBSD-src-e091fdc169106db4a26d45d02c2f30fe9c708556.zip
FreeBSD-src-e091fdc169106db4a26d45d02c2f30fe9c708556.tar.gz
When counting nodes second time, use the same criteria as for
the first time. PR: kern/98529 Submitted by: Michael Heyman
Diffstat (limited to 'sys/netgraph/ng_base.c')
-rw-r--r--sys/netgraph/ng_base.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index 4dc58ee..e1073f4 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -2654,15 +2654,15 @@ ng_generic_msg(node_p here, item_p item, hook_p lasthook)
LIST_FOREACH(node, &ng_nodelist, nd_nodes) {
struct nodeinfo *const np = &nl->nodeinfo[nl->numnames];
+ if (NG_NODE_NOT_VALID(node))
+ continue;
+ if (!unnamed && (! NG_NODE_HAS_NAME(node)))
+ continue;
if (nl->numnames >= num) {
log(LOG_ERR, "%s: number of %s changed\n",
__func__, "nodes");
break;
}
- if (NG_NODE_NOT_VALID(node))
- continue;
- if (!unnamed && (! NG_NODE_HAS_NAME(node)))
- continue;
if (NG_NODE_HAS_NAME(node))
strcpy(np->name, NG_NODE_NAME(node));
strcpy(np->type, node->nd_type->name);
OpenPOWER on IntegriCloud