summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_one2many.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-01-30 20:51:52 +0000
committerjulian <julian@FreeBSD.org>2001-01-30 20:51:52 +0000
commit829347d51049c2e13e3480a34b697ad0706f544d (patch)
tree3a9e298fda80b85b295437ee382beb9478e01b0b /sys/netgraph/ng_one2many.c
parentc699ccaa2e2324716dbff91054e658cba135b735 (diff)
downloadFreeBSD-src-829347d51049c2e13e3480a34b697ad0706f544d.zip
FreeBSD-src-829347d51049c2e13e3480a34b697ad0706f544d.tar.gz
Implement direct support for semipersistant nodes.
(e.g. ethernet nodes are persistent until you rip out the hardware) Use this support in the ethernet and sample nodes. Add some more abstraction on the 'item's so that node and hook reference counting can be checked easier. Slight man page correction. Make pppoe type dependent on ethernet type. Clean up node shutdown a little. Move a mutex from MTX_SPIN to MTX_DEF (oops) Fix small ref-counting bug. remove warning on one2many type.
Diffstat (limited to 'sys/netgraph/ng_one2many.c')
-rw-r--r--sys/netgraph/ng_one2many.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netgraph/ng_one2many.c b/sys/netgraph/ng_one2many.c
index e78f92e..ead577a 100644
--- a/sys/netgraph/ng_one2many.c
+++ b/sys/netgraph/ng_one2many.c
@@ -379,7 +379,7 @@ ng_one2many_rcvdata(hook_p hook, item_p item)
const node_p node = NG_HOOK_NODE(hook);
const priv_p priv = NG_NODE_PRIVATE(node);
struct ng_one2many_link *src;
- struct ng_one2many_link *dst;
+ struct ng_one2many_link *dst = NULL;
int error = 0;
int linkNum;
int i;
@@ -453,8 +453,9 @@ ng_one2many_rcvdata(hook_p hook, item_p item)
panic("%s: invalid xmitAlg", __FUNCTION__);
#endif
}
- } else
+ } else {
dst = &priv->one;
+ }
/* Update transmit stats */
dst->stats.xmitPackets++;
OpenPOWER on IntegriCloud