Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/npf/npfctl npfctl: fix the bpf.jit parameter handling.



details:   https://anonhg.NetBSD.org/src/rev/f9fe165163a4
branches:  trunk
changeset: 457941:f9fe165163a4
user:      rmind <rmind%NetBSD.org@localhost>
date:      Thu Jul 25 00:48:55 2019 +0000

description:
npfctl: fix the bpf.jit parameter handling.

diffstat:

 usr.sbin/npf/npfctl/npf_build.c |  3 ++-
 usr.sbin/npf/npfctl/npfctl.c    |  4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r 9d091b1194be -r f9fe165163a4 usr.sbin/npf/npfctl/npf_build.c
--- a/usr.sbin/npf/npfctl/npf_build.c   Thu Jul 25 00:42:43 2019 +0000
+++ b/usr.sbin/npf/npfctl/npf_build.c   Thu Jul 25 00:48:55 2019 +0000
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: npf_build.c,v 1.49 2019/07/23 00:52:02 rmind Exp $");
+__RCSID("$NetBSD: npf_build.c,v 1.50 2019/07/25 00:48:55 rmind Exp $");
 
 #include <sys/types.h>
 #define        __FAVOR_BSD
@@ -969,6 +969,7 @@
 {
        if (strcmp(name, "bpf.jit") == 0) {
                npfctl_bpfjit(val != 0);
+               return;
        }
        if (npf_param_set(npf_conf, name, val) != 0) {
                yyerror("invalid parameter `%s` or its value", name);
diff -r 9d091b1194be -r f9fe165163a4 usr.sbin/npf/npfctl/npfctl.c
--- a/usr.sbin/npf/npfctl/npfctl.c      Thu Jul 25 00:42:43 2019 +0000
+++ b/usr.sbin/npf/npfctl/npfctl.c      Thu Jul 25 00:48:55 2019 +0000
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: npfctl.c,v 1.59 2019/07/23 00:52:02 rmind Exp $");
+__RCSID("$NetBSD: npfctl.c,v 1.60 2019/07/25 00:48:55 rmind Exp $");
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -231,7 +231,7 @@
        const char *srcfile = ne->source_file;
 
        if (ne->error_msg) {
-               warnx("%s", ne->error_msg);
+               errx(EXIT_FAILURE, "%s", ne->error_msg);
        }
        if (srcfile) {
                warnx("source %s line %d", srcfile, ne->source_line);



Home | Main Index | Thread Index | Old Index