Module Name: src
Committed By: rmind
Date: Sun Aug 24 20:37:35 UTC 2014
Modified Files:
src/lib/libnpf: npf.c
Log Message:
npf_config_submit: finally, include the saved connections.
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libnpf/npf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libnpf/npf.c
diff -u src/lib/libnpf/npf.c:1.33 src/lib/libnpf/npf.c:1.34
--- src/lib/libnpf/npf.c:1.33 Mon Aug 11 23:48:01 2014
+++ src/lib/libnpf/npf.c Sun Aug 24 20:37:35 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: npf.c,v 1.33 2014/08/11 23:48:01 rmind Exp $ */
+/* $NetBSD: npf.c,v 1.34 2014/08/24 20:37:35 rmind Exp $ */
/*-
* Copyright (c) 2010-2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.33 2014/08/11 23:48:01 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.34 2014/08/24 20:37:35 rmind Exp $");
#include <sys/types.h>
#include <netinet/in_systm.h>
@@ -69,13 +69,14 @@ struct nl_ext {
};
struct nl_config {
- /* Rules, translations, tables, procedures. */
+ /* Rules, translations, procedures, tables, connections. */
prop_dictionary_t ncf_dict;
prop_array_t ncf_alg_list;
prop_array_t ncf_rules_list;
prop_array_t ncf_rproc_list;
prop_array_t ncf_table_list;
prop_array_t ncf_nat_list;
+ prop_array_t ncf_conn_list;
/* Iterators. */
prop_object_iterator_t ncf_rule_iter;
@@ -153,6 +154,10 @@ npf_config_submit(nl_config_t *ncf, int
prop_dictionary_set(npf_dict, "rprocs", ncf->ncf_rproc_list);
prop_dictionary_set(npf_dict, "tables", ncf->ncf_table_list);
prop_dictionary_set(npf_dict, "nat", ncf->ncf_nat_list);
+ if (ncf->ncf_conn_list) {
+ prop_dictionary_set(npf_dict, "conn-list",
+ ncf->ncf_conn_list);
+ }
prop_dictionary_set_bool(npf_dict, "flush", ncf->ncf_flush);
if (ncf->ncf_debug) {
prop_dictionary_set(npf_dict, "debug", ncf->ncf_debug);
@@ -194,6 +199,7 @@ _npf_config_consdict(prop_dictionary_t n
ncf->ncf_rproc_list = prop_dictionary_get(npf_dict, "rprocs");
ncf->ncf_table_list = prop_dictionary_get(npf_dict, "tables");
ncf->ncf_nat_list = prop_dictionary_get(npf_dict, "nat");
+ ncf->ncf_conn_list = prop_dictionary_get(npf_dict, "conn-list");
return ncf;
}