Module Name:    src
Committed By:   rmind
Date:           Thu Jul 25 00:48:55 UTC 2019

Modified Files:
        src/usr.sbin/npf/npfctl: npf_build.c npfctl.c

Log Message:
npfctl: fix the bpf.jit parameter handling.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/npf/npfctl/npf_build.c
cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/npf/npfctl/npfctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/npf/npfctl/npf_build.c
diff -u src/usr.sbin/npf/npfctl/npf_build.c:1.49 src/usr.sbin/npf/npfctl/npf_build.c:1.50
--- src/usr.sbin/npf/npfctl/npf_build.c:1.49	Tue Jul 23 00:52:02 2019
+++ src/usr.sbin/npf/npfctl/npf_build.c	Thu Jul 25 00:48:55 2019
@@ -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 @@ npfctl_setparam(const char *name, int va
 {
 	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);

Index: src/usr.sbin/npf/npfctl/npfctl.c
diff -u src/usr.sbin/npf/npfctl/npfctl.c:1.59 src/usr.sbin/npf/npfctl/npfctl.c:1.60
--- src/usr.sbin/npf/npfctl/npfctl.c:1.59	Tue Jul 23 00:52:02 2019
+++ src/usr.sbin/npf/npfctl/npfctl.c	Thu Jul 25 00:48:55 2019
@@ -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 @@ npfctl_print_error(const npf_error_t *ne
 	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);

Reply via email to