summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2005-04-20 14:19:20 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2005-04-20 14:19:20 +0000
commit3b1c41c548ec210752bfa8db8559aae3ea47b55f (patch)
tree265ccaef7199ce2e7616cec3732e1bf78691215a
parent46917bb6f4204ae7ac1e2dd965d6f608f3e9d59b (diff)
downloadsrc-test2-3b1c41c548ec210752bfa8db8559aae3ea47b55f.tar.gz
src-test2-3b1c41c548ec210752bfa8db8559aae3ea47b55f.zip
Notes
-rw-r--r--sys/netgraph/ng_vlan.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/netgraph/ng_vlan.c b/sys/netgraph/ng_vlan.c
index cf94709a8d86..437f2323e9bb 100644
--- a/sys/netgraph/ng_vlan.c
+++ b/sys/netgraph/ng_vlan.c
@@ -299,6 +299,34 @@ ng_vlan_rcvmsg(node_p node, item_p item, hook_p lasthook)
break;
}
break;
+ case NGM_FLOW_COOKIE:
+ {
+ struct ng_mesg *copy;
+ struct filterhead *chain;
+ struct filter *f;
+
+ /*
+ * Flow control messages should come only
+ * from downstream.
+ */
+
+ if (lasthook == NULL)
+ break;
+ if (lasthook != priv->downstream_hook)
+ break;
+
+ /* Broadcast the event to all uplinks. */
+ for (i = 0, chain = priv->hashtable; i < HASHSIZE;
+ i++, chain++)
+ LIST_FOREACH(f, chain, next) {
+ NG_COPYMESSAGE(copy, msg, M_NOWAIT);
+ if (copy == NULL)
+ continue;
+ NG_SEND_MSG_HOOK(error, node, copy, f->hook, 0);
+ }
+
+ break;
+ }
default: /* Unknown type cookie. */
error = EINVAL;
break;