From 43eca7506ea5d8df027735013dd04b809a0d4cdc Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 11 Mar 2005 10:29:38 +0000 Subject: [PATCH] Fix getting stats from many links with index > 0. Submitted by: Richard Kojedzinszky MFC after: 3 days --- sys/netgraph/ng_one2many.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netgraph/ng_one2many.c b/sys/netgraph/ng_one2many.c index 66f3a947f49c..ca742b3dc959 100644 --- a/sys/netgraph/ng_one2many.c +++ b/sys/netgraph/ng_one2many.c @@ -331,7 +331,7 @@ ng_one2many_rcvmsg(node_p node, item_p item, hook_p lasthook) linkNum = *((int32_t *)msg->data); if (linkNum == NG_ONE2MANY_ONE_LINKNUM) link = &priv->one; - else if (linkNum == 0 + else if (linkNum >= 0 && linkNum < NG_ONE2MANY_MAX_LINKS) { link = &priv->many[linkNum]; } else {