summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_base.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-02-05 18:57:11 +0000
committerjulian <julian@FreeBSD.org>2001-02-05 18:57:11 +0000
commit86cb214594355ba9efe9aa0205cb878a8e8f3ecd (patch)
tree29fe75b4f90c31aeed1338596195c5243ec60a12 /sys/netgraph/ng_base.c
parent9c3b71e869cdd031139aee8095d94618d940d570 (diff)
downloadFreeBSD-src-86cb214594355ba9efe9aa0205cb878a8e8f3ecd.zip
FreeBSD-src-86cb214594355ba9efe9aa0205cb878a8e8f3ecd.tar.gz
Make netgraph modules refuse to link with modules of a different ABI version.
also try implement teh documented behaviour in socket nodes so that when there is only one hook, an unaddressed write/send will DTRT and send the data to that hook.
Diffstat (limited to 'sys/netgraph/ng_base.c')
-rw-r--r--sys/netgraph/ng_base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index d071f5f..860d210 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -63,7 +63,7 @@
#include <netgraph/netgraph.h>
#include <netgraph/ng_parse.h>
-MODULE_VERSION(netgraph, 1);
+MODULE_VERSION(netgraph, NG_ABI_VERSION);
/* List of all active nodes */
static LIST_HEAD(, ng_node) ng_nodelist;
@@ -1423,6 +1423,7 @@ ng_rmnode_self(node_p node)
if (node == &ng_deadnode)
return (0);
+ node->nd_flags |= NG_INVALID;
if (node->nd_flags & NG_CLOSING)
return (0);
OpenPOWER on IntegriCloud