Source-Changes-HG archive

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

[src/netbsd-6]: src Pull up following revision(s) (requested by rmind in tick...



details:   https://anonhg.NetBSD.org/src/rev/f202b1e1483a
branches:  netbsd-6
changeset: 775454:f202b1e1483a
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Nov 19 18:16:17 2012 +0000

description:
Pull up following revision(s) (requested by rmind in ticket #653):
        lib/libnpf/npf.c: revision 1.14
        usr.sbin/npf/npfctl/npf_var.h: revision 1.5
Fix for npfctl show case.  Improve some description while here.

diffstat:

 lib/libnpf/npf.c              |  11 ++++++-----
 usr.sbin/npf/npfctl/npf_var.h |  14 +++++++-------
 2 files changed, 13 insertions(+), 12 deletions(-)

diffs (73 lines):

diff -r 1b6e5b7bd3a5 -r f202b1e1483a lib/libnpf/npf.c
--- a/lib/libnpf/npf.c  Mon Nov 19 18:04:53 2012 +0000
+++ b/lib/libnpf/npf.c  Mon Nov 19 18:16:17 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf.c,v 1.7.2.6 2012/11/18 22:38:25 riz Exp $  */
+/*     $NetBSD: npf.c,v 1.7.2.7 2012/11/19 18:16:17 riz Exp $  */
 
 /*-
  * Copyright (c) 2010-2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.7.2.6 2012/11/18 22:38:25 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.7.2.7 2012/11/19 18:16:17 riz Exp $");
 
 #include <sys/types.h>
 #include <netinet/in_systm.h>
@@ -213,13 +213,11 @@
 npf_config_destroy(nl_config_t *ncf)
 {
 
-       if (ncf->ncf_dict == NULL) {
+       if (!ncf->ncf_dict) {
                prop_object_release(ncf->ncf_rules_list);
                prop_object_release(ncf->ncf_rproc_list);
                prop_object_release(ncf->ncf_table_list);
                prop_object_release(ncf->ncf_nat_list);
-       } else {
-               prop_object_release(ncf->ncf_dict);
        }
        if (ncf->ncf_err) {
                prop_object_release(ncf->ncf_err);
@@ -408,6 +406,9 @@
                (*func)(&nrl, nlevel);
 
                subrules = prop_dictionary_get(rldict, "subrules");
+               if (!subrules) {
+                       continue;
+               }
                (void)_npf_rule_foreach1(subrules, nlevel + 1, func);
                prop_object_release(subrules);
        }
diff -r 1b6e5b7bd3a5 -r f202b1e1483a usr.sbin/npf/npfctl/npf_var.h
--- a/usr.sbin/npf/npfctl/npf_var.h     Mon Nov 19 18:04:53 2012 +0000
+++ b/usr.sbin/npf/npfctl/npf_var.h     Mon Nov 19 18:16:17 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf_var.h,v 1.1.2.3 2012/11/18 22:38:28 riz Exp $      */
+/*     $NetBSD: npf_var.h,v 1.1.2.4 2012/11/19 18:16:18 riz Exp $      */
 
 /*-
  * Copyright (c) 2011-2012 The NetBSD Foundation, Inc.
@@ -54,14 +54,14 @@
 static const char *npfvar_types[ ] = {
        [NPFVAR_STRING]         = "string",
        [NPFVAR_IDENTIFIER]     = "identifier",
-       [NPFVAR_VAR_ID]         = "var_id",
-       [NPFVAR_NUM]            = "num",
+       [NPFVAR_VAR_ID]         = "variable-id",
+       [NPFVAR_NUM]            = "number",
        [NPFVAR_PORT_RANGE]     = "port-range",
        [NPFVAR_TABLE]          = "table",
-       [NPFVAR_FAM]            = "fam",
-       [NPFVAR_PROC]           = "proc",
-       [NPFVAR_PROC_PARAM]     = "proc_param",
-       [NPFVAR_TCPFLAG]        = "tcpflag",
+       [NPFVAR_FAM]            = "family-address-mask",
+       [NPFVAR_PROC]           = "procedure",
+       [NPFVAR_PROC_PARAM]     = "procedure-parameter",
+       [NPFVAR_TCPFLAG]        = "tcp-flag",
        [NPFVAR_ICMP]           = "icmp",
        [NPFVAR_ICMP6]          = "icmp6"
 };



Home | Main Index | Thread Index | Old Index