Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libnpf npf_config_submit: finally, include the saved con...



details:   https://anonhg.NetBSD.org/src/rev/029d36ea9ef6
branches:  trunk
changeset: 331806:029d36ea9ef6
user:      rmind <rmind%NetBSD.org@localhost>
date:      Sun Aug 24 20:37:35 2014 +0000

description:
npf_config_submit: finally, include the saved connections.

diffstat:

 lib/libnpf/npf.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r afff9511a3b2 -r 029d36ea9ef6 lib/libnpf/npf.c
--- a/lib/libnpf/npf.c  Sun Aug 24 20:36:30 2014 +0000
+++ b/lib/libnpf/npf.c  Sun Aug 24 20:37:35 2014 +0000
@@ -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_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 @@
        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 @@
        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;
 }
 



Home | Main Index | Thread Index | Old Index