Source-Changes-HG archive

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

[src/netbsd-6-0]: src/lib/libnpf Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/9c910b23c3b5
branches:  netbsd-6-0
changeset: 774680:9c910b23c3b5
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Nov 19 18:15:24 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 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (43 lines):

diff -r b99f556590fb -r 9c910b23c3b5 lib/libnpf/npf.c
--- a/lib/libnpf/npf.c  Mon Nov 19 18:06:33 2012 +0000
+++ b/lib/libnpf/npf.c  Mon Nov 19 18:15:24 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf.c,v 1.7.2.5 2012/08/19 17:40:31 riz Exp $  */
+/*     $NetBSD: npf.c,v 1.7.2.5.4.1 2012/11/19 18:15:24 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.5 2012/08/19 17:40:31 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.7.2.5.4.1 2012/11/19 18:15:24 riz Exp $");
 
 #include <sys/types.h>
 #include <netinet/in_systm.h>
@@ -208,13 +208,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);
@@ -366,6 +364,9 @@
                (*func)(&nrl, nlevel);
 
                subrules = prop_dictionary_get(rldict, "subrules");
+               if (!subrules) {
+                       continue;
+               }
                (void)_npf_rule_foreach1(subrules, nlevel + 1, func);
        }
        prop_object_iterator_release(it);



Home | Main Index | Thread Index | Old Index