Blame SOURCES/0002-main-restore-debug.patch

911625
From 0c808b1ee29d4a0974f4cc5c0586138730361a41 Mon Sep 17 00:00:00 2001
911625
From: Phil Sutter <psutter@redhat.com>
911625
Date: Fri, 10 Jan 2020 19:54:16 +0100
911625
Subject: [PATCH] main: restore --debug
911625
911625
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1778883
911625
Upstream Status: nftables commit ea5af85371bd1
911625
911625
commit ea5af85371bd18658ea2ffa0a6c9c48e2c64684b
911625
Author: Pablo Neira Ayuso <pablo@netfilter.org>
911625
Date:   Thu Jan 9 18:16:18 2020 +0100
911625
911625
    main: restore --debug
911625
911625
    Broken since options are mandatory before commands.
911625
911625
    Fixes: fb9cea50e8b3 ("main: enforce options before commands")
911625
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
911625
---
911625
 src/main.c | 6 ++++--
911625
 1 file changed, 4 insertions(+), 2 deletions(-)
911625
911625
diff --git a/src/main.c b/src/main.c
911625
index 74199f9..6ab1b89 100644
911625
--- a/src/main.c
911625
+++ b/src/main.c
911625
@@ -46,7 +46,7 @@ enum opt_vals {
911625
 	OPT_TERSE		= 't',
911625
 	OPT_INVALID		= '?',
911625
 };
911625
-#define OPTSTRING	"+hvcf:iI:jvnsNaeSupypTt"
911625
+#define OPTSTRING	"+hvd:cf:iI:jvnsNaeSupypTt"
911625
 
911625
 static const struct option options[] = {
911625
 	{
911625
@@ -228,8 +228,10 @@ static bool nft_options_check(int argc, char * const argv[])
911625
 			if (nonoption) {
911625
 				nft_options_error(argc, argv, pos);
911625
 				return false;
911625
-			} else if (argv[i][1] == 'I' ||
911625
+			} else if (argv[i][1] == 'd' ||
911625
+				   argv[i][1] == 'I' ||
911625
 				   argv[i][1] == 'f' ||
911625
+				   !strcmp(argv[i], "--debug") ||
911625
 				   !strcmp(argv[i], "--includepath") ||
911625
 				   !strcmp(argv[i], "--file")) {
911625
 				skip = true;
911625
-- 
8ff5ad
2.31.1
911625